Skip to content

Avoid failure TFBlipModelTest::test_pipeline_image_to_text#31827

Merged
ydshieh merged 3 commits intomainfrom
fix_pip
Jul 8, 2024
Merged

Avoid failure TFBlipModelTest::test_pipeline_image_to_text#31827
ydshieh merged 3 commits intomainfrom
fix_pip

Conversation

@ydshieh
Copy link
Copy Markdown
Collaborator

@ydshieh ydshieh commented Jul 7, 2024

What does this PR do?

Currently,

FAILED tests/models/blip/test_modeling_tf_blip.py::TFBlipModelTest::test_pipeline_image_to_text - NameError: name 'torch' is not defined

is failing on main after (#31342)

See https://app.circleci.com/pipelines/github/huggingface/transformers/97187/workflows/81b63940-fd42-4a6a-aafe-404301fafc1d/jobs/1285954

There is a slight difference between Pipeline.__init__ and pipeline: the later one has

    if isinstance(torch_dtype, str) and hasattr(torch, torch_dtype):
       torch_dtype = getattr(torch, torch_dtype)

which we should have a check on if torch is available. I will open another PR for that.


Also for 2 Failed: Timeout >120.0s: the fix for them is the same as their non _fp16 versions.

FAILED tests/models/vits/test_modeling_vits.py::VitsModelTest::test_pipeline_feature_extraction_fp16 - Failed: Timeout >120.0s

FAILED tests/models/efficientnet/test_modeling_efficientnet.py::EfficientNetModelTest::test_pipeline_image_feature_extraction_fp16 - Failed: Timeout >120.0s

@ydshieh ydshieh requested a review from amyeroberts July 7, 2024 10:48
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Contributor

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for handling!

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.

3 participants