use torch.testing.assertclose instead to get more details about error in cis (#35659)
* use torch.testing.assertclose instead to get more details about error in cis * fix * style * test_all * revert for I bert * fixes and updates * more image processing fixes * more image processors * fix mamba and co * style * less strick * ok I won't be strict * skip and be done * up
This commit is contained in:
@@ -737,7 +737,7 @@ class XCLIPModelIntegrationTest(unittest.TestCase):
|
||||
|
||||
expected_logits = torch.tensor([[14.0181, 20.2771, 14.4776]], device=torch_device)
|
||||
|
||||
self.assertTrue(torch.allclose(outputs.logits_per_video, expected_logits, atol=1e-3))
|
||||
torch.testing.assert_close(outputs.logits_per_video, expected_logits, rtol=1e-3, atol=1e-3)
|
||||
|
||||
@slow
|
||||
def test_inference_interpolate_pos_encoding(self):
|
||||
@@ -771,6 +771,6 @@ class XCLIPModelIntegrationTest(unittest.TestCase):
|
||||
[[0.0126, 0.2109, 0.0609], [0.0448, 0.5862, -0.1688], [-0.0881, 0.8525, -0.3044]]
|
||||
).to(torch_device)
|
||||
|
||||
self.assertTrue(
|
||||
torch.allclose(outputs.vision_model_output.last_hidden_state[0, :3, :3], expected_slice, atol=1e-4)
|
||||
torch.testing.assert_close(
|
||||
outputs.vision_model_output.last_hidden_state[0, :3, :3], expected_slice, rtol=1e-4, atol=1e-4
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user