From cd9786e787386c185ef915b3983c5d2861a32907 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Wed, 3 Feb 2021 18:22:23 -0800 Subject: [PATCH] Disable random-dependent tests Summary: These two tests fail (with non-small differences) when the seed is changed or if certain environmental changes are made. We disable them pending investigation. A small change to the tolerance at the failing assertion doesn't help. The change in common_testing helps diagnose this. Reviewed By: shapovalov Differential Revision: D26233419 fbshipit-source-id: 357afc1786825256c9bade101fb15707e4dea5ed --- tests/common_testing.py | 5 +---- tests/test_cameras_alignment.py | 1 + tests/test_points_alignment.py | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/common_testing.py b/tests/common_testing.py index 27eafc2c..134ca9b5 100644 --- a/tests/common_testing.py +++ b/tests/common_testing.py @@ -99,13 +99,10 @@ class TestCaseMixin(unittest.TestCase): # all(|norm_fn(input - other)| <= atol + rtol * |norm_fn(other)|) == # all(norm_fn(input - other) <= atol + rtol * norm_fn(other)). - backend = torch if torch.is_tensor(input) else np - close = backend.allclose( + self.assertClose( diff + other_, other_, rtol=rtol, atol=atol, equal_nan=equal_nan ) - self.assertTrue(close, msg) - def assertClose( self, input: TensorOrArray, diff --git a/tests/test_cameras_alignment.py b/tests/test_cameras_alignment.py index 0c7aa276..ba5bd402 100644 --- a/tests/test_cameras_alignment.py +++ b/tests/test_cameras_alignment.py @@ -27,6 +27,7 @@ class TestCamerasAlignment(TestCaseMixin, unittest.TestCase): """ Checks the corresponding_cameras_alignment function. """ + self.skipTest("Temporarily disabled pending investigation") device = torch.device("cuda:0") # try few different random setups diff --git a/tests/test_points_alignment.py b/tests/test_points_alignment.py index 680e6a69..0846b3a9 100644 --- a/tests/test_points_alignment.py +++ b/tests/test_points_alignment.py @@ -498,6 +498,7 @@ class TestCorrespondingPointsAlignment(TestCaseMixin, unittest.TestCase): - use_pointclouds ... If True, passes the Pointclouds objects to corresponding_points_alignment. """ + self.skipTest("Temporarily disabled pending investigation") # run this for several different point cloud sizes for n_points in (100, 3, 2, 1): # run this for several different dimensionalities