fix kyutai tests (#39416)

* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: eustlb <94853470+eustlb@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2025-07-25 18:42:04 +02:00
committed by GitHub
parent 4f17bf0572
commit 4b125e2993

View File

@@ -777,4 +777,11 @@ class KyutaiSpeechToTextForConditionalGenerationIntegrationTests(unittest.TestCa
]) ])
# fmt: on # fmt: on
torch.testing.assert_close(out.cpu(), EXPECTED_TOKENS) # See https://github.com/huggingface/transformers/pull/39416
EXPECTED_TOKENS_2 = torch.clone(EXPECTED_TOKENS)
EXPECTED_TOKENS_2[2, 159:162] = torch.tensor([3, 0, 269])
try:
torch.testing.assert_close(out.cpu(), EXPECTED_TOKENS)
except AssertionError:
torch.testing.assert_close(out.cpu(), EXPECTED_TOKENS_2)