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
80e3b363
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "23fef594fe1cd69af39b42e7e5dbaf65d0ee1505"
Unverified
Commit
80e3b363
authored
Mar 22, 2023
by
Sylvain Gugger
Browse files
Really fix quality due to ruff release
parent
ef28df05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
tests/pipelines/test_pipelines_automatic_speech_recognition.py
.../pipelines/test_pipelines_automatic_speech_recognition.py
+4
-2
tests/pipelines/test_pipelines_image_segmentation.py
tests/pipelines/test_pipelines_image_segmentation.py
+4
-4
No files found.
tests/pipelines/test_pipelines_automatic_speech_recognition.py
View file @
80e3b363
...
...
@@ -56,8 +56,10 @@ if is_torch_available():
@
is_pipeline_test
class
AutomaticSpeechRecognitionPipelineTests
(
unittest
.
TestCase
):
model_mapping
=
dict
((
list
(
MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING
.
items
())
if
MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING
else
[])
+
(
MODEL_FOR_CTC_MAPPING
.
items
()
if
MODEL_FOR_CTC_MAPPING
else
[]))
model_mapping
=
dict
(
(
list
(
MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING
.
items
())
if
MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING
else
[])
+
(
MODEL_FOR_CTC_MAPPING
.
items
()
if
MODEL_FOR_CTC_MAPPING
else
[])
)
def
get_test_pipeline
(
self
,
model
,
tokenizer
,
processor
):
if
tokenizer
is
None
:
...
...
tests/pipelines/test_pipelines_image_segmentation.py
View file @
80e3b363
...
...
@@ -80,11 +80,11 @@ def mask_to_test_readable_only_shape(mask: Image) -> Dict:
@
require_timm
@
require_torch
class
ImageSegmentationPipelineTests
(
unittest
.
TestCase
):
model_mapping
=
dict
((
list
(
MODEL_FOR_IMAGE_SEGMENTATION_MAPPING
.
items
())
if
MODEL_FOR_IMAGE_SEGMENTATION_MAPPING
else
[]
)
model_mapping
=
dict
(
(
list
(
MODEL_FOR_IMAGE_SEGMENTATION_MAPPING
.
items
())
if
MODEL_FOR_IMAGE_SEGMENTATION_MAPPING
else
[])
+
(
MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING
.
items
()
if
MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING
else
[])
+
(
MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING
.
items
()
if
MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING
else
[]))
+
(
MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING
.
items
()
if
MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING
else
[])
)
def
get_test_pipeline
(
self
,
model
,
tokenizer
,
processor
):
image_segmenter
=
ImageSegmentationPipeline
(
model
=
model
,
image_processor
=
processor
)
...
...
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