Rework pipeline tests (#19366)
* Rework pipeline tests * Try to fix Flax tests * Try to put it before * Use a new decorator instead * Remove ignore marker since it doesn't work * Filter pipeline tests * Woopsie * Use the fitlered list * Clean up and fake modif * Remove init * Revert fake modif
This commit is contained in:
@@ -25,14 +25,7 @@ from transformers import (
|
||||
pipeline,
|
||||
)
|
||||
from transformers.pipelines import AggregationStrategy, TokenClassificationArgumentHandler
|
||||
from transformers.testing_utils import (
|
||||
is_pipeline_test,
|
||||
nested_simplify,
|
||||
require_tf,
|
||||
require_torch,
|
||||
require_torch_gpu,
|
||||
slow,
|
||||
)
|
||||
from transformers.testing_utils import nested_simplify, require_tf, require_torch, require_torch_gpu, slow
|
||||
|
||||
from .test_pipelines_common import ANY, PipelineTestCaseMeta
|
||||
|
||||
@@ -40,7 +33,6 @@ from .test_pipelines_common import ANY, PipelineTestCaseMeta
|
||||
VALID_INPUTS = ["A simple string", ["list of strings", "A simple string that is quite a bit longer"]]
|
||||
|
||||
|
||||
@is_pipeline_test
|
||||
class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta):
|
||||
model_mapping = MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING
|
||||
tf_model_mapping = TF_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING
|
||||
@@ -770,7 +762,6 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
||||
)
|
||||
|
||||
|
||||
@is_pipeline_test
|
||||
class TokenClassificationArgumentHandlerTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.args_parser = TokenClassificationArgumentHandler()
|
||||
|
||||
Reference in New Issue
Block a user