Unverified Commit 4341f4e2 authored by Younes Belkada's avatar Younes Belkada Committed by GitHub
Browse files

[Pipeline] skip feature extraction test if in `IMAGE_PROCESSOR_MAPPING` (#20790)

skip feature extraction test if in `IMAGE_PROCESSOR_MAPPING`
parent 1543cee7
...@@ -18,6 +18,7 @@ import numpy as np ...@@ -18,6 +18,7 @@ import numpy as np
from transformers import ( from transformers import (
FEATURE_EXTRACTOR_MAPPING, FEATURE_EXTRACTOR_MAPPING,
IMAGE_PROCESSOR_MAPPING,
MODEL_MAPPING, MODEL_MAPPING,
TF_MODEL_MAPPING, TF_MODEL_MAPPING,
FeatureExtractionPipeline, FeatureExtractionPipeline,
...@@ -178,7 +179,11 @@ class FeatureExtractionPipelineTests(unittest.TestCase, metaclass=PipelineTestCa ...@@ -178,7 +179,11 @@ class FeatureExtractionPipelineTests(unittest.TestCase, metaclass=PipelineTestCa
if tokenizer is None: if tokenizer is None:
self.skipTest("No tokenizer") self.skipTest("No tokenizer")
return return
elif type(model.config) in FEATURE_EXTRACTOR_MAPPING or isinstance(model.config, LxmertConfig): elif (
type(model.config) in FEATURE_EXTRACTOR_MAPPING
or isinstance(model.config, LxmertConfig)
or type(model.config) in IMAGE_PROCESSOR_MAPPING
):
self.skipTest("This is a bimodal model, we need to find a more consistent way to switch on those models.") self.skipTest("This is a bimodal model, we need to find a more consistent way to switch on those models.")
return return
elif model.config.is_encoder_decoder: elif model.config.is_encoder_decoder:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment