Fix flaky CircleCI test.

Summary: This fixes issues with `pulsar.test.TestDepth` that we are encountering on CircleCI. The ID equality test is removed, which seems to give different results on different hardware (which is okay, because the exact order of spheres can slightly vary if they're close due to numerical instabilities). The depth map validity test stays in place.

Reviewed By: bottler

Differential Revision: D24840776

fbshipit-source-id: 2f38ea4880abf202c84d2987fdd71a84c5ef3b05
This commit is contained in:
Christoph Lassner 2020-11-10 10:13:06 -08:00 committed by Facebook GitHub Bot
parent aefe2b9f0d
commit fb2763dc78

View File

@ -62,7 +62,6 @@ class TestDepth(TestCaseMixin, unittest.TestCase):
bg_col=torch.zeros(1, device=device, dtype=torch.float32),
percent_allowed_difference=0.01,
)
sphere_ids = Renderer.sphere_ids_from_result_info_nograd(result_info)
depth_map = Renderer.depth_map_from_result_info_nograd(result_info)
depth_vis = (depth_map - depth_map[depth_map > 0].min()) * 200 / (
depth_map.max() - depth_map[depth_map > 0.0].min()
@ -87,12 +86,6 @@ class TestDepth(TestCaseMixin, unittest.TestCase):
# )
# sys.exit(0)
reference = torch.load(OUT_REF_FP, map_location="cpu")
self.assertTrue(
torch.sum(
reference["sphere_ids"][..., 0].to(device) == sphere_ids[..., 0]
)
> 65530
)
self.assertClose(reference["depth_map"].to(device), depth_map)