Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
cbb2f75a
Unverified
Commit
cbb2f75a
authored
Sep 21, 2020
by
Stas Bekman
Committed by
GitHub
Sep 21, 2020
Browse files
[s2s tests] fix test_run_eval_search (#7297)
parent
7a88ed6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
examples/seq2seq/test_seq2seq_examples.py
examples/seq2seq/test_seq2seq_examples.py
+5
-5
No files found.
examples/seq2seq/test_seq2seq_examples.py
View file @
cbb2f75a
...
@@ -346,14 +346,14 @@ def test_run_eval_search(model):
...
@@ -346,14 +346,14 @@ def test_run_eval_search(model):
task
=
"translation_en_to_de"
if
model
==
T5_TINY
else
"summarization"
task
=
"translation_en_to_de"
if
model
==
T5_TINY
else
"summarization"
testargs
=
f
"""
testargs
=
f
"""
run_eval_search.py
run_eval_search.py
--model_name
{
model
}
{
model
}
--data_dir
{
str
(
input_file_name
)
}
{
str
(
input_file_name
)
}
--save_dir
{
str
(
output_file_name
)
}
{
str
(
output_file_name
)
}
--score_path
{
score_path
}
--score_path
{
score_path
}
--reference_path
{
reference_path
}
,
--reference_path
{
reference_path
}
--task
{
task
}
--task
{
task
}
--search num_beams=1:2 length_penalty=0.9:1.0
"""
.
split
()
"""
.
split
()
testargs
.
extend
([
"--search"
,
"num_beams=1:2 length_penalty=0.9:1.0"
])
with
patch
.
object
(
sys
,
"argv"
,
testargs
):
with
patch
.
object
(
sys
,
"argv"
,
testargs
):
with
CaptureStdout
()
as
cs
:
with
CaptureStdout
()
as
cs
:
...
...
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