Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid failure TFBlipModelTest::test_pipeline_image_to_text #31827

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
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: 6 additions & 0 deletions tests/models/efficientnet/test_modeling_efficientnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ def test_model_from_pretrained(self):
def test_pipeline_image_feature_extraction(self):
super().test_pipeline_image_feature_extraction()

@is_pipeline_test
@require_vision
@slow
def test_pipeline_image_feature_extraction_fp16(self):
super().test_pipeline_image_feature_extraction_fp16()

@is_pipeline_test
@require_vision
@slow
Expand Down
4 changes: 4 additions & 0 deletions tests/models/vits/test_modeling_vits.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ def test_config(self):
def test_pipeline_feature_extraction(self):
super().test_pipeline_feature_extraction()

@is_flaky(description="torch 2.2.0 gives `Timeout >120.0s`")
def test_pipeline_feature_extraction_fp16(self):
super().test_pipeline_feature_extraction_fp16()

@unittest.skip(reason="Need to fix this after #26538")
def test_model_forward(self):
set_seed(12345)
Expand Down
6 changes: 3 additions & 3 deletions tests/pipelines/test_pipelines_image_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import requests

from transformers import MODEL_FOR_VISION_2_SEQ_MAPPING, TF_MODEL_FOR_VISION_2_SEQ_MAPPING, is_vision_available
from transformers.pipelines import pipeline
from transformers.pipelines import ImageToTextPipeline, pipeline
from transformers.testing_utils import (
is_pipeline_test,
require_tf,
Expand Down Expand Up @@ -46,8 +46,8 @@ class ImageToTextPipelineTests(unittest.TestCase):
tf_model_mapping = TF_MODEL_FOR_VISION_2_SEQ_MAPPING

def get_test_pipeline(self, model, tokenizer, processor, torch_dtype="float32"):
pipe = pipeline(
"image-to-text", model=model, tokenizer=tokenizer, image_processor=processor, torch_dtype=torch_dtype
pipe = ImageToTextPipeline(
model=model, tokenizer=tokenizer, image_processor=processor, torch_dtype=torch_dtype
)
examples = [
Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"),
Expand Down
Loading