Unverified Commit 06a82a49 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Specify TF framework in TF-related pipeline tests (#19719)


Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent f3ed26a3
...@@ -56,7 +56,7 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta ...@@ -56,7 +56,7 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta
@require_tf @require_tf
def test_small_model_tf(self): def test_small_model_tf(self):
pipe = pipeline("image-to-text", model="hf-internal-testing/tiny-random-vit-gpt2") pipe = pipeline("image-to-text", model="hf-internal-testing/tiny-random-vit-gpt2", framework="tf")
image = "./tests/fixtures/tests_samples/COCO/000000039769.png" image = "./tests/fixtures/tests_samples/COCO/000000039769.png"
outputs = pipe(image) outputs = pipe(image)
...@@ -64,7 +64,12 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta ...@@ -64,7 +64,12 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta
outputs, outputs,
[ [
{ {
"generated_text": "growthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthGOGO" "generated_text": (
" intermedi intermedi intermedi intermedi intermedi "
"explorer explorer explorer explorer explorer explorer "
"explorer medicine medicine medicine medicine medicine "
"medicine medicine"
)
}, },
], ],
) )
...@@ -75,13 +80,23 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta ...@@ -75,13 +80,23 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta
[ [
[ [
{ {
"generated_text": "growthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthGOGO" "generated_text": (
} " intermedi intermedi intermedi intermedi intermedi "
"explorer explorer explorer explorer explorer explorer "
"explorer medicine medicine medicine medicine medicine "
"medicine medicine"
)
},
], ],
[ [
{ {
"generated_text": "growthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthgrowthGOGO" "generated_text": (
} " intermedi intermedi intermedi intermedi intermedi "
"explorer explorer explorer explorer explorer explorer "
"explorer medicine medicine medicine medicine medicine "
"medicine medicine"
)
},
], ],
], ],
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment