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
04683c06
Unverified
Commit
04683c06
authored
Nov 25, 2021
by
Nicolas Patry
Committed by
GitHub
Nov 25, 2021
Browse files
Fix a slow test. (#14527)
parent
d1fd64e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/test_pipelines_audio_classification.py
tests/test_pipelines_audio_classification.py
+5
-5
No files found.
tests/test_pipelines_audio_classification.py
View file @
04683c06
...
@@ -114,12 +114,12 @@ class AudioClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
...
@@ -114,12 +114,12 @@ class AudioClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
audio
=
np
.
array
(
dataset
[
3
][
"speech"
],
dtype
=
np
.
float32
)
audio
=
np
.
array
(
dataset
[
3
][
"speech"
],
dtype
=
np
.
float32
)
output
=
audio_classifier
(
audio
,
top_k
=
4
)
output
=
audio_classifier
(
audio
,
top_k
=
4
)
self
.
assertEqual
(
self
.
assertEqual
(
nested_simplify
(
output
,
decimals
=
4
),
nested_simplify
(
output
,
decimals
=
3
),
[
[
{
"score"
:
0.98
09
,
"label"
:
"go"
},
{
"score"
:
0.98
1
,
"label"
:
"go"
},
{
"score"
:
0.007
3
,
"label"
:
"up"
},
{
"score"
:
0.007
,
"label"
:
"up"
},
{
"score"
:
0.006
4
,
"label"
:
"_unknown_"
},
{
"score"
:
0.006
,
"label"
:
"_unknown_"
},
{
"score"
:
0.001
5
,
"label"
:
"down"
},
{
"score"
:
0.001
,
"label"
:
"down"
},
],
],
)
)
...
...
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