Byebye torch 1.10 (#28207)

* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2024-01-11 16:18:27 +01:00
committed by GitHub
parent e768616afa
commit 59cd9de39d
31 changed files with 39 additions and 194 deletions

View File

@@ -515,7 +515,6 @@ class WavLMModelIntegrationTest(unittest.TestCase):
EXPECTED_HIDDEN_STATES_SLICE = torch.tensor(
[[[0.0577, 0.1161], [0.0579, 0.1165]], [[0.0199, 0.1237], [0.0059, 0.0605]]]
)
# TODO: update the tolerance after the CI moves to torch 1.10
self.assertTrue(torch.allclose(hidden_states_slice, EXPECTED_HIDDEN_STATES_SLICE, atol=5e-2))
def test_inference_large(self):
@@ -567,7 +566,6 @@ class WavLMModelIntegrationTest(unittest.TestCase):
)
self.assertEqual(labels[0, :, 0].sum(), 258)
self.assertEqual(labels[0, :, 1].sum(), 647)
# TODO: update the tolerance after the CI moves to torch 1.10
self.assertTrue(torch.allclose(outputs.logits[:, :4], expected_logits, atol=1e-2))
def test_inference_speaker_verification(self):
@@ -592,5 +590,4 @@ class WavLMModelIntegrationTest(unittest.TestCase):
# id10002 vs id10004
self.assertAlmostEqual(cosine_sim(embeddings[2], embeddings[3]).item(), 0.4780, 3)
# TODO: update the tolerance after the CI moves to torch 1.10
self.assertAlmostEqual(outputs.loss.item(), 18.4154, 2)