Commit fb2763dc authored by Christoph Lassner's avatar Christoph Lassner Committed by Facebook GitHub Bot
Browse files

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
parent aefe2b9f
...@@ -62,7 +62,6 @@ class TestDepth(TestCaseMixin, unittest.TestCase): ...@@ -62,7 +62,6 @@ class TestDepth(TestCaseMixin, unittest.TestCase):
bg_col=torch.zeros(1, device=device, dtype=torch.float32), bg_col=torch.zeros(1, device=device, dtype=torch.float32),
percent_allowed_difference=0.01, 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_map = Renderer.depth_map_from_result_info_nograd(result_info)
depth_vis = (depth_map - depth_map[depth_map > 0].min()) * 200 / ( depth_vis = (depth_map - depth_map[depth_map > 0].min()) * 200 / (
depth_map.max() - depth_map[depth_map > 0.0].min() depth_map.max() - depth_map[depth_map > 0.0].min()
...@@ -87,12 +86,6 @@ class TestDepth(TestCaseMixin, unittest.TestCase): ...@@ -87,12 +86,6 @@ class TestDepth(TestCaseMixin, unittest.TestCase):
# ) # )
# sys.exit(0) # sys.exit(0)
reference = torch.load(OUT_REF_FP, map_location="cpu") 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) self.assertClose(reference["depth_map"].to(device), depth_map)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment