Generate: fix flaky tests (#27543)

This commit is contained in:
Joao Gante
2023-11-17 10:15:00 +00:00
committed by GitHub
parent d903abfccc
commit 913d03dc5e
3 changed files with 20 additions and 25 deletions

View File

@@ -692,7 +692,7 @@ class LogitsProcessorTest(unittest.TestCase):
torch.allclose(
scores,
torch.tensor(
[[0.0, 0.7, 0.8, 0.0], [0.1, torch.finfo(scores.dtype).max, 0.3, float("-inf")]],
[[0.0, 0.7, 0.8, 0.0], [0.1, torch.finfo(scores.dtype).max, 0.3, torch.finfo(scores.dtype).min]],
device=torch_device,
),
atol=1e-6,