Fix nighlty CIs: missing atols (#35903)

fix osme missing atols
This commit is contained in:
Arthur
2025-02-11 10:49:21 +01:00
committed by GitHub
parent 1feebb5b41
commit 1779f5180e
2 changed files with 2 additions and 2 deletions

View File

@@ -410,7 +410,7 @@ class DPTModelIntegrationTest(unittest.TestCase):
predicted_depth.unsqueeze(0).unsqueeze(1), size=(500, 500), mode="bicubic", align_corners=False predicted_depth.unsqueeze(0).unsqueeze(1), size=(500, 500), mode="bicubic", align_corners=False
).squeeze() ).squeeze()
self.assertTrue(output_enlarged.shape == expected_shape) self.assertTrue(output_enlarged.shape == expected_shape)
torch.testing.assert_close(predicted_depth_l, output_enlarged, rtol=1e-3) torch.testing.assert_close(predicted_depth_l, output_enlarged, atol=1e-3, rtol=1e-3)
def test_export(self): def test_export(self):
for strict in [True, False]: for strict in [True, False]:

View File

@@ -323,7 +323,7 @@ class ZoeDepthModelIntegrationTest(unittest.TestCase):
for img, out, expected_slice in zip(images, outputs, expected_slices): for img, out, expected_slice in zip(images, outputs, expected_slices):
out = out["predicted_depth"] out = out["predicted_depth"]
self.assertTrue(img.size == out.shape[::-1]) self.assertTrue(img.size == out.shape[::-1])
torch.testing.assert_close(expected_slice, out[:3, :3], rtol=1e-3) torch.testing.assert_close(expected_slice, out[:3, :3], atol=1e-3, rtol=1e-3)
self.check_target_size(image_processor, pad_input, images, outputs, raw_outputs, raw_outputs_flipped) self.check_target_size(image_processor, pad_input, images, outputs, raw_outputs, raw_outputs_flipped)