From 23b7e73f0581a880370477597dc948e07c2f064b Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Thu, 26 Jun 2025 18:36:56 +0200 Subject: [PATCH] fix `test_compare_unprocessed_logit_scores` (#39053) fix Co-authored-by: ydshieh --- tests/generation/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/generation/test_utils.py b/tests/generation/test_utils.py index 2525b020c4..746fd2179d 100644 --- a/tests/generation/test_utils.py +++ b/tests/generation/test_utils.py @@ -3807,7 +3807,7 @@ class GenerationIntegrationTests(unittest.TestCase): logits_gen = outputs.logits[0][0] # assert that unprocessed logits from generate() are same as those from modal eval() - self.assertListEqual(logits_fwd.tolist(), logits_gen.tolist()) + torch.testing.assert_allclose(logits_fwd.tolist(), logits_gen.tolist()) def test_return_unprocessed_logit_scores(self): # tell model to generate text and return unprocessed/unwarped logit scores