mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-02-06 14:02:19 +08:00
move targets
Summary: Move testing targets from pytorch3d/tests/TARGETS to pytorch3d/TARGETS. Reviewed By: shapovalov Differential Revision: D36186940 fbshipit-source-id: a4c52c4d99351f885e2b0bf870532d530324039b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f625fe1f8b
commit
34f648ede0
@@ -5,16 +5,11 @@
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
import importlib
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
import unittest.mock
|
||||
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import get_pytorch3d_dir
|
||||
else:
|
||||
from tests.common_testing import get_pytorch3d_dir
|
||||
from tests.common_testing import get_pytorch3d_dir
|
||||
|
||||
|
||||
# This file groups together tests which look at the code without running it.
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
import os
|
||||
import unittest
|
||||
from math import pi
|
||||
|
||||
@@ -15,12 +14,7 @@ from pytorch3d.implicitron.tools.circle_fitting import (
|
||||
fit_circle_in_3d,
|
||||
)
|
||||
from pytorch3d.transforms import random_rotation
|
||||
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import TestCaseMixin
|
||||
else:
|
||||
from tests.common_testing import TestCaseMixin
|
||||
from tests.common_testing import TestCaseMixin
|
||||
|
||||
|
||||
class TestCircleFitting(TestCaseMixin, unittest.TestCase):
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from omegaconf import OmegaConf
|
||||
@@ -30,15 +29,9 @@ from pytorch3d.implicitron.tools.config import (
|
||||
get_default_args,
|
||||
remove_unused_components,
|
||||
)
|
||||
from tests.common_testing import get_tests_dir
|
||||
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import get_tests_dir
|
||||
|
||||
from .common_resources import provide_resnet34
|
||||
else:
|
||||
from common_resources import provide_resnet34
|
||||
from tests.common_testing import get_tests_dir
|
||||
from .common_resources import provide_resnet34
|
||||
|
||||
DATA_DIR = get_tests_dir() / "implicitron/data"
|
||||
DEBUG: bool = False
|
||||
|
||||
@@ -4,17 +4,12 @@
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from omegaconf import OmegaConf
|
||||
from pytorch3d.implicitron.dataset.data_source import ImplicitronDataSource
|
||||
from pytorch3d.implicitron.tools.config import get_default_args
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import get_tests_dir
|
||||
else:
|
||||
from tests.common_testing import get_tests_dir
|
||||
from tests.common_testing import get_tests_dir
|
||||
|
||||
DATA_DIR = get_tests_dir() / "implicitron/data"
|
||||
DEBUG: bool = False
|
||||
|
||||
@@ -21,15 +21,9 @@ from pytorch3d.vis.plotly_vis import plot_scene
|
||||
if os.environ.get("INSIDE_RE_WORKER") is None:
|
||||
from visdom import Visdom
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from .common_resources import get_skateboard_data
|
||||
else:
|
||||
from common_resources import get_skateboard_data
|
||||
from tests.common_testing import interactive_testing_requested
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import interactive_testing_requested
|
||||
else:
|
||||
from tests.common_testing import interactive_testing_requested
|
||||
from .common_resources import get_skateboard_data
|
||||
|
||||
|
||||
class TestDatasetVisualize(unittest.TestCase):
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import torch
|
||||
@@ -13,12 +12,7 @@ from pytorch3d.implicitron.tools.eval_video_trajectory import (
|
||||
)
|
||||
from pytorch3d.renderer.cameras import look_at_view_transform, PerspectiveCameras
|
||||
from pytorch3d.transforms import axis_angle_to_matrix
|
||||
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import TestCaseMixin
|
||||
else:
|
||||
from tests.common_testing import TestCaseMixin
|
||||
from tests.common_testing import TestCaseMixin
|
||||
|
||||
|
||||
class TestEvalCameras(TestCaseMixin, unittest.TestCase):
|
||||
|
||||
@@ -9,16 +9,9 @@ import unittest
|
||||
|
||||
from pytorch3d.implicitron import eval_demo
|
||||
|
||||
from tests.common_testing import interactive_testing_requested
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from .common_resources import CO3D_MANIFOLD_PATH, get_path_manager
|
||||
else:
|
||||
from common_resources import CO3D_MANIFOLD_PATH, get_path_manager
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import interactive_testing_requested
|
||||
else:
|
||||
from tests.common_testing import interactive_testing_requested
|
||||
from .common_resources import CO3D_MANIFOLD_PATH, get_path_manager
|
||||
|
||||
"""
|
||||
This test runs a single sequence eval_demo, useful for debugging datasets.
|
||||
|
||||
@@ -13,16 +13,9 @@ from pytorch3d.implicitron.models.generic_model import GenericModel
|
||||
from pytorch3d.implicitron.models.renderer.base import EvaluationMode
|
||||
from pytorch3d.implicitron.tools.config import expand_args_fields, get_default_args
|
||||
from pytorch3d.renderer.cameras import look_at_view_transform, PerspectiveCameras
|
||||
from tests.common_testing import get_pytorch3d_dir
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from .common_resources import provide_resnet34
|
||||
else:
|
||||
from common_resources import provide_resnet34
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import get_pytorch3d_dir
|
||||
else:
|
||||
from tests.common_testing import get_pytorch3d_dir
|
||||
from .common_resources import provide_resnet34
|
||||
|
||||
IMPLICITRON_CONFIGS_DIR = (
|
||||
get_pytorch3d_dir() / "projects" / "implicitron_trainer" / "configs"
|
||||
|
||||
@@ -4,18 +4,12 @@
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import torch
|
||||
from pytorch3d.implicitron.models.renderer.ray_point_refiner import RayPointRefiner
|
||||
from pytorch3d.renderer import RayBundle
|
||||
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import TestCaseMixin
|
||||
else:
|
||||
from tests.common_testing import TestCaseMixin
|
||||
from tests.common_testing import TestCaseMixin
|
||||
|
||||
|
||||
class TestRayPointRefiner(TestCaseMixin, unittest.TestCase):
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import torch
|
||||
@@ -16,12 +15,7 @@ from pytorch3d.implicitron.models.implicit_function.scene_representation_network
|
||||
from pytorch3d.implicitron.models.renderer.base import ImplicitFunctionWrapper
|
||||
from pytorch3d.implicitron.tools.config import get_default_args
|
||||
from pytorch3d.renderer import RayBundle
|
||||
|
||||
|
||||
if os.environ.get("FB_TEST", False):
|
||||
from common_testing import TestCaseMixin
|
||||
else:
|
||||
from tests.common_testing import TestCaseMixin
|
||||
from tests.common_testing import TestCaseMixin
|
||||
|
||||
_BATCH_SIZE: int = 3
|
||||
_N_RAYS: int = 100
|
||||
|
||||
Reference in New Issue
Block a user