Skip to content

Commit

Permalink
test_forward_pass: speedup and RE fix
Browse files Browse the repository at this point in the history
Summary: Use small image size for test_all_gm_configs

Reviewed By: shapovalov

Differential Revision: D36511528

fbshipit-source-id: 2c65f518a4f23626850343a62d103f85abfabd88
  • Loading branch information
bottler authored and facebook-github-bot committed May 22, 2022
1 parent 2d1c6d5 commit d27ef14
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/implicitron/test_forward_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
from pytorch3d.implicitron.tools.config import expand_args_fields, get_default_args
from pytorch3d.renderer.cameras import look_at_view_transform, PerspectiveCameras

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
Expand All @@ -26,6 +30,10 @@


class TestGenericModel(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
provide_resnet34()

def setUp(self):
torch.manual_seed(42)

Expand Down Expand Up @@ -54,6 +62,8 @@ def test_all_gm_configs(self):
for config_file in config_files:
with self.subTest(name=config_file.stem):
cfg = _load_model_config_from_yaml(str(config_file))
cfg.render_image_height = 80
cfg.render_image_width = 80
model = GenericModel(**cfg)
model.to(device)
self._one_model_test(
Expand Down

0 comments on commit d27ef14

Please sign in to comment.