Skip to content

Commit

Permalink
Fix pipelines tests (huggingface#34049)
Browse files Browse the repository at this point in the history
* Fix wrong skip annotation

* Remove error raise
  • Loading branch information
qubvel authored Oct 10, 2024
1 parent a84c413 commit 66e08db
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_pipeline_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ def run_task_tests(self, task, torch_dtype="float32"):
image_processor_names.append(cls_name)
elif "FeatureExtractor" in cls_name:
feature_extractor_names.append(cls_name)
else:
raise ValueError(f"Unknown processor class: {cls_name}")

# Processor classes are not in tiny models JSON file, so extract them from the mapping
# processors are mapped to instance, e.g. "XxxProcessor"
Expand All @@ -242,12 +240,12 @@ def run_task_tests(self, task, torch_dtype="float32"):
commit=commit,
torch_dtype=torch_dtype,
)
at_least_one_model_is_tested = True

if task in task_to_pipeline_and_spec_mapping:
pipeline, hub_spec = task_to_pipeline_and_spec_mapping[task]
compare_pipeline_args_to_hub_spec(pipeline, hub_spec)

at_least_one_model_is_tested = True

if not at_least_one_model_is_tested:
self.skipTest(
f"{self.__class__.__name__}::test_pipeline_{task.replace('-', '_')}_{torch_dtype} is skipped: Could not find any "
Expand Down

0 comments on commit 66e08db

Please sign in to comment.