Fix quality due to ruff release
This commit is contained in:
@@ -56,11 +56,8 @@ if is_torch_available():
|
||||
|
||||
@is_pipeline_test
|
||||
class AutomaticSpeechRecognitionPipelineTests(unittest.TestCase):
|
||||
model_mapping = {
|
||||
k: v
|
||||
for k, v in (list(MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING.items()) if MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING else [])
|
||||
+ (MODEL_FOR_CTC_MAPPING.items() if MODEL_FOR_CTC_MAPPING else [])
|
||||
}
|
||||
model_mapping = dict((list(MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING.items()) if MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING else [])
|
||||
+ (MODEL_FOR_CTC_MAPPING.items() if MODEL_FOR_CTC_MAPPING else []))
|
||||
|
||||
def get_test_pipeline(self, model, tokenizer, processor):
|
||||
if tokenizer is None:
|
||||
|
||||
@@ -80,14 +80,11 @@ def mask_to_test_readable_only_shape(mask: Image) -> Dict:
|
||||
@require_timm
|
||||
@require_torch
|
||||
class ImageSegmentationPipelineTests(unittest.TestCase):
|
||||
model_mapping = {
|
||||
k: v
|
||||
for k, v in (
|
||||
model_mapping = dict((
|
||||
list(MODEL_FOR_IMAGE_SEGMENTATION_MAPPING.items()) if MODEL_FOR_IMAGE_SEGMENTATION_MAPPING else []
|
||||
)
|
||||
+ (MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING.items() if MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING else [])
|
||||
+ (MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING.items() if MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING else [])
|
||||
}
|
||||
+ (MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING.items() if MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING else []))
|
||||
|
||||
def get_test_pipeline(self, model, tokenizer, processor):
|
||||
image_segmenter = ImageSegmentationPipeline(model=model, image_processor=processor)
|
||||
|
||||
Reference in New Issue
Block a user