mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +06:00
[Pipeline] skip feature extraction test if in IMAGE_PROCESSOR_MAPPING
(#20790)
skip feature extraction test if in `IMAGE_PROCESSOR_MAPPING`
This commit is contained in:
parent
1543cee7c8
commit
4341f4e224
@ -18,6 +18,7 @@ import numpy as np
|
||||
|
||||
from transformers import (
|
||||
FEATURE_EXTRACTOR_MAPPING,
|
||||
IMAGE_PROCESSOR_MAPPING,
|
||||
MODEL_MAPPING,
|
||||
TF_MODEL_MAPPING,
|
||||
FeatureExtractionPipeline,
|
||||
@ -178,7 +179,11 @@ class FeatureExtractionPipelineTests(unittest.TestCase, metaclass=PipelineTestCa
|
||||
if tokenizer is None:
|
||||
self.skipTest("No tokenizer")
|
||||
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.")
|
||||
return
|
||||
elif model.config.is_encoder_decoder:
|
||||
|
Loading…
Reference in New Issue
Block a user