[tests] add the missing require_sacremoses decorator (#29504)
* add sacremoses check * fix style * for FlaubertTokenizer * HerbertTokenizer fix * add typeHint * Update src/transformers/testing_utils.py Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com> * make less skipped * make quality * remove import --------- Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
This commit is contained in:
@@ -16,7 +16,7 @@ import os
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
from transformers import FlaubertConfig, is_torch_available
|
||||
from transformers import FlaubertConfig, is_sacremoses_available, is_torch_available
|
||||
from transformers.testing_utils import require_torch, require_torch_accelerator, slow, torch_device
|
||||
|
||||
from ...test_configuration_common import ConfigTester
|
||||
@@ -386,7 +386,7 @@ class FlaubertModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
|
||||
"token-classification": FlaubertForTokenClassification,
|
||||
"zero-shot": FlaubertForSequenceClassification,
|
||||
}
|
||||
if is_torch_available()
|
||||
if is_torch_available() and is_sacremoses_available()
|
||||
else {}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user