Move is_pipeline_test_to_skip to specific model test classes (#21999)
* Move `is_pipeline_test_to_skip` to specific model test classes --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -326,6 +326,22 @@ class LongformerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
|
||||
else {}
|
||||
)
|
||||
|
||||
# TODO: Fix the failed tests
|
||||
def is_pipeline_test_to_skip(
|
||||
self, pipeline_test_casse_name, config_class, model_architecture, tokenizer_name, processor_name
|
||||
):
|
||||
if (
|
||||
pipeline_test_casse_name == "QAPipelineTests"
|
||||
and tokenizer_name is not None
|
||||
and not tokenizer_name.endswith("Fast")
|
||||
):
|
||||
# `QAPipelineTests` fails for a few models when the slower tokenizer are used.
|
||||
# (The slower tokenizers were never used for pipeline tests before the pipeline testing rework)
|
||||
# TODO: check (and possibly fix) the `QAPipelineTests` with slower tokenizer
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def setUp(self):
|
||||
self.model_tester = LongformerModelTester(self)
|
||||
self.config_tester = ConfigTester(self, config_class=LongformerConfig, hidden_size=37)
|
||||
|
||||
@@ -299,6 +299,22 @@ class TFLongformerModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.Te
|
||||
test_head_masking = False
|
||||
test_onnx = False
|
||||
|
||||
# TODO: Fix the failed tests
|
||||
def is_pipeline_test_to_skip(
|
||||
self, pipeline_test_casse_name, config_class, model_architecture, tokenizer_name, processor_name
|
||||
):
|
||||
if (
|
||||
pipeline_test_casse_name == "QAPipelineTests"
|
||||
and tokenizer_name is not None
|
||||
and not tokenizer_name.endswith("Fast")
|
||||
):
|
||||
# `QAPipelineTests` fails for a few models when the slower tokenizer are used.
|
||||
# (The slower tokenizers were never used for pipeline tests before the pipeline testing rework)
|
||||
# TODO: check (and possibly fix) the `QAPipelineTests` with slower tokenizer
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def setUp(self):
|
||||
self.model_tester = TFLongformerModelTester(self)
|
||||
self.config_tester = ConfigTester(self, config_class=LongformerConfig, hidden_size=37)
|
||||
|
||||
Reference in New Issue
Block a user