Update expected values (after switching to A10) - part 4 (#39189)

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2025-07-03 15:13:06 +02:00
committed by GitHub
parent b31e9d19a6
commit a25fc3592e
25 changed files with 298 additions and 138 deletions

View File

@@ -24,6 +24,7 @@ from pytest import mark
from transformers import VideoMAEConfig
from transformers.models.auto import get_values
from transformers.testing_utils import (
Expectations,
is_flaky,
require_flash_attn,
require_torch,
@@ -442,9 +443,14 @@ class VideoMAEModelIntegrationTest(unittest.TestCase):
expected_shape = torch.Size((1, 400))
self.assertEqual(outputs.logits.shape, expected_shape)
expected_slice = torch.tensor([0.3669, -0.0688, -0.2421]).to(torch_device)
torch.testing.assert_close(outputs.logits[0, :3], expected_slice, rtol=1e-4, atol=1e-4)
expectations = Expectations(
{
(None, None): [0.3669, -0.0688, -0.2421],
("cuda", 8): [0.3668, -0.0690, -0.2421],
}
)
expected_slice = torch.tensor(expectations.get_expectation()).to(torch_device)
torch.testing.assert_close(outputs.logits[0, :3], expected_slice, rtol=2e-4, atol=2e-4)
@slow
def test_inference_for_pretraining(self):