Skip to content

Fix pipelines tests#34049

Merged
qubvel merged 2 commits intohuggingface:mainfrom
qubvel:fix-pipelines-tests
Oct 10, 2024
Merged

Fix pipelines tests#34049
qubvel merged 2 commits intohuggingface:mainfrom
qubvel:fix-pipelines-tests

Conversation

@qubvel
Copy link
Contributor

@qubvel qubvel commented Oct 9, 2024

What does this PR do?

Following

  1. Fix failed pipeline test for Pix2Struct
  2. Fix tests that were wrongly annotated as skipped, while they were not skipped actually

Comment on lines 214 to -218
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}")
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

Comment on lines +243 to 249
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:
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

@qubvel qubvel requested a review from LysandreJik October 9, 2024 19:19
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Thanks! cc @Rocketknight1 for knowledge (please ping him for anything pipeline-related)

@qubvel qubvel merged commit 66e08db into huggingface:main Oct 10, 2024
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
* Fix wrong skip annotation

* Remove error raise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants