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
7480ded6
"git@developer.sourcefind.cn:OpenDAS/apex.git" did not exist on "32ab028c140462b857e9f7e59d99dc6dd6ae74e3"
Unverified
Commit
7480ded6
authored
Jan 11, 2022
by
Lysandre Debut
Committed by
GitHub
Jan 11, 2022
Browse files
Fix failing test (#15104)
parent
28e09143
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
tests/test_processor_wav2vec2_with_lm.py
tests/test_processor_wav2vec2_with_lm.py
+5
-1
No files found.
tests/test_processor_wav2vec2_with_lm.py
View file @
7480ded6
...
@@ -243,8 +243,12 @@ class Wav2Vec2ProcessorWithLMTest(unittest.TestCase):
...
@@ -243,8 +243,12 @@ class Wav2Vec2ProcessorWithLMTest(unittest.TestCase):
path_to_cached_dir
=
Path
(
language_model
.
_kenlm_model
.
path
.
decode
(
"utf-8"
)).
parent
.
parent
.
absolute
()
path_to_cached_dir
=
Path
(
language_model
.
_kenlm_model
.
path
.
decode
(
"utf-8"
)).
parent
.
parent
.
absolute
()
downloaded_decoder_files
=
os
.
listdir
(
path_to_cached_dir
)
downloaded_decoder_files
=
os
.
listdir
(
path_to_cached_dir
)
expected_decoder_files
=
[
"alphabet.json"
,
"language_model"
]
downloaded_decoder_files
.
sort
()
expected_decoder_files
.
sort
()
# test that only decoder relevant files from
# test that only decoder relevant files from
# https://huggingface.co/hf-internal-testing/processor_with_lm/tree/main
# https://huggingface.co/hf-internal-testing/processor_with_lm/tree/main
# are downloaded and none of the rest (e.g. README.md, ...)
# are downloaded and none of the rest (e.g. README.md, ...)
self
.
assertListEqual
(
downloaded_decoder_files
,
[
"alphabet.json"
,
"language_model"
]
)
self
.
assertListEqual
(
downloaded_decoder_files
,
expected_decoder_files
)
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