[testing] slow tests should be marked as slow (#7895)

* slow tests should be slow

* exception note

* style

* integrate LysandreJik's notes with some expansions

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* another slow test

* fix link, and prose

* clarify.

* note from Sam

* typo

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
Stas Bekman
2020-10-22 03:34:05 -07:00
committed by GitHub
parent 95792a948e
commit 8348105692
4 changed files with 34 additions and 7 deletions

View File

@@ -295,6 +295,7 @@ class TestMarian_en_ROMANCE(MarianIntegrationTest):
with self.assertRaises(ValueError):
self.tokenizer.prepare_seq2seq_batch([""])
@slow
def test_pipeline(self):
device = 0 if torch_device == "cuda" else -1
pipeline = TranslationPipeline(self.model, self.tokenizer, framework="pt", device=device)

View File

@@ -379,6 +379,7 @@ class MonoColumnInputTestCase(unittest.TestCase):
@require_torch
@require_tokenizers
@slow
def test_torch_translation(self):
invalid_inputs = [4, "<mask>"]
mandatory_keys = ["translation_text"]

View File

@@ -34,12 +34,13 @@ from transformers.testing_utils import (
DUMMY_UNKWOWN_IDENTIFIER,
SMALL_MODEL_IDENTIFIER,
require_tokenizers,
slow,
)
from transformers.tokenization_auto import TOKENIZER_MAPPING
class AutoTokenizerTest(unittest.TestCase):
# @slow
@slow
def test_tokenizer_from_pretrained(self):
for model_name in (x for x in BERT_PRETRAINED_CONFIG_ARCHIVE_MAP.keys() if "japanese" not in x):
tokenizer = AutoTokenizer.from_pretrained(model_name)