DocumentQuestionAnsweringPipeline only for fast ⚡ tokenizers (#22745)
* fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -295,15 +295,10 @@ class LayoutLMv2ModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCa
|
||||
# `LayoutLMv2Config` was never used in pipeline tests (`test_pt_LayoutLMv2Config_XXX`) due to lack of tiny
|
||||
# config. With new tiny model creation, it is available, but we need to fix the failed tests.
|
||||
return True
|
||||
elif (
|
||||
pipeline_test_casse_name == "DocumentQuestionAnsweringPipelineTests"
|
||||
and tokenizer_name is not None
|
||||
and not tokenizer_name.endswith("Fast")
|
||||
):
|
||||
# This pipeline uses `sequence_ids()` which is only available for fast tokenizers.
|
||||
return True
|
||||
|
||||
return False
|
||||
return super().is_pipeline_test_to_skip(
|
||||
pipeline_test_casse_name, config_class, model_architecture, tokenizer_name, processor_name
|
||||
)
|
||||
|
||||
def setUp(self):
|
||||
self.model_tester = LayoutLMv2ModelTester(self)
|
||||
|
||||
Reference in New Issue
Block a user