Fix slow tests v2 (#8746)
* Fix BART test * Fix MBART tests * Remove erroneous line from yaml * Update tests/test_modeling_bart.py * Quality
This commit is contained in:
Родитель
2c83b3c38d
Коммит
6fdd0bb231
|
@ -9,7 +9,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- ci_*
|
- ci_*
|
||||||
- framework-agnostic-tokenizers
|
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
|
|
|
@ -492,7 +492,9 @@ class BartModelIntegrationTests(unittest.TestCase):
|
||||||
inputs_dict = prepare_bart_inputs_dict(model.config, input_ids)
|
inputs_dict = prepare_bart_inputs_dict(model.config, input_ids)
|
||||||
# Test that model hasn't changed
|
# Test that model hasn't changed
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
batched_logits, features = model(**inputs_dict)
|
outputs = model(**inputs_dict)
|
||||||
|
|
||||||
|
batched_logits = outputs[0]
|
||||||
expected_shape = torch.Size((2, 3))
|
expected_shape = torch.Size((2, 3))
|
||||||
self.assertEqual(batched_logits.shape, expected_shape)
|
self.assertEqual(batched_logits.shape, expected_shape)
|
||||||
expected_slice = torch.Tensor([[0.1907, 1.4342, -1.0289]]).to(torch_device)
|
expected_slice = torch.Tensor([[0.1907, 1.4342, -1.0289]]).to(torch_device)
|
||||||
|
|
|
@ -62,7 +62,7 @@ class AbstractSeq2SeqIntegrationTest(unittest.TestCase):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.tokenizer = AutoTokenizer.from_pretrained(cls.checkpoint_name)
|
cls.tokenizer = AutoTokenizer.from_pretrained(cls.checkpoint_name, use_fast=False)
|
||||||
return cls
|
return cls
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
|
|
Загрузка…
Ссылка в новой задаче