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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user