Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
06a82a49
Unverified
Commit
06a82a49
authored
Oct 18, 2022
by
Yih-Dar
Committed by
GitHub
Oct 18, 2022
Browse files
Specify TF framework in TF-related pipeline tests (#19719)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
f3ed26a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
tests/pipelines/test_pipelines_image_to_text.py
tests/pipelines/test_pipelines_image_to_text.py
+21
-6
No files found.
tests/pipelines/test_pipelines_image_to_text.py
View file @
06a82a49
...
...
@@ -56,7 +56,7 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta
@
require_tf
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"
outputs
=
pipe
(
image
)
...
...
@@ -64,7 +64,12 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta
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
[
[
{
"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"
)
},
],
],
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment