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:
@@ -489,7 +489,7 @@ class MoonshineModelIntegrationTests(unittest.TestCase):
|
||||
-8.0796, -7.3300, -7.3672, -6.8765, -7.6876, -7.2682, -6.9866, -6.7457, -7.6855, -7.3050,
|
||||
])
|
||||
# fmt: on
|
||||
self.assertTrue(torch.allclose(outputs.logits[0][0, :30].cpu(), EXPECTED_LOGITS, atol=1e-4))
|
||||
torch.testing.assert_close(outputs.logits[0][0, :30].cpu(), EXPECTED_LOGITS, rtol=1e-4, atol=1e-4)
|
||||
|
||||
@slow
|
||||
def test_base_logits_single(self):
|
||||
@@ -507,7 +507,7 @@ class MoonshineModelIntegrationTests(unittest.TestCase):
|
||||
-7.9310, -8.1024, -7.8699, -7.8231, -8.0752, -7.9764, -7.8127, -8.0536, -7.9492, -7.9290,
|
||||
])
|
||||
# fmt: on
|
||||
self.assertTrue(torch.allclose(outputs.logits[0][0, :30].cpu(), EXPECTED_LOGITS, atol=1e-4))
|
||||
torch.testing.assert_close(outputs.logits[0][0, :30].cpu(), EXPECTED_LOGITS, rtol=1e-4, atol=1e-4)
|
||||
|
||||
@slow
|
||||
def test_tiny_logits_batch(self):
|
||||
@@ -525,7 +525,7 @@ class MoonshineModelIntegrationTests(unittest.TestCase):
|
||||
[-10.8078, 4.0030, -0.0633, -5.0505, -5.3906, -5.4590, -5.2420, -5.4746, -5.2665, -5.3158]
|
||||
])
|
||||
# fmt: on
|
||||
self.assertTrue(torch.allclose(outputs.logits[0][:, :10].cpu(), EXPECTED_LOGITS, atol=1e-4))
|
||||
torch.testing.assert_close(outputs.logits[0][:, :10].cpu(), EXPECTED_LOGITS, rtol=1e-4, atol=1e-4)
|
||||
|
||||
@slow
|
||||
def test_base_logits_batch(self):
|
||||
@@ -545,7 +545,7 @@ class MoonshineModelIntegrationTests(unittest.TestCase):
|
||||
])
|
||||
|
||||
# fmt: on
|
||||
self.assertTrue(torch.allclose(outputs.logits[0][:, :10].cpu(), EXPECTED_LOGITS, atol=1e-4))
|
||||
torch.testing.assert_close(outputs.logits[0][:, :10].cpu(), EXPECTED_LOGITS, rtol=1e-4, atol=1e-4)
|
||||
|
||||
@slow
|
||||
def test_tiny_generation_single(self):
|
||||
|
||||
Reference in New Issue
Block a user