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
97c30b73
Commit
97c30b73
authored
Aug 20, 2019
by
erenup
Browse files
add test related code
parent
d5e60e5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/single_model_scripts/run_multiple_choice.py
examples/single_model_scripts/run_multiple_choice.py
+1
-1
No files found.
examples/single_model_scripts/run_multiple_choice.py
View file @
97c30b73
...
...
@@ -256,7 +256,7 @@ def evaluate(args, model, tokenizer, prefix="", test=False):
result
=
{
"eval_acc"
:
acc
,
"eval_loss"
:
eval_loss
}
results
.
update
(
result
)
output_eval_file
=
os
.
path
.
join
(
eval_output_dir
,
"eval_results.txt"
)
output_eval_file
=
os
.
path
.
join
(
eval_output_dir
,
"
is_test_"
+
str
(
test
)
+
"_
eval_results.txt"
)
with
open
(
output_eval_file
,
"w"
)
as
writer
:
logger
.
info
(
"***** Eval results {} *****"
.
format
(
str
(
prefix
)
+
" is test:"
+
str
(
test
)))
...
...
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