Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}")
Comment on lines 214 to -218
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pix2Struct model has Processor object in tiny model json, and that led to an error raised for Pix2Struct and filed test. Error raise is not required here because we take the processor from PROCESSOR_MAPPING_NAMES, we can just skip this Processor


# 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:
Comment on lines +243 to 249
Copy link
Contributor Author

@qubvel qubvel Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like it was a wrong merge with main, some tests are marked as skipped while they were not actually skipped

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