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
4b082bd4
Unverified
Commit
4b082bd4
authored
Sep 09, 2019
by
Rohit Kumar Singh
Committed by
GitHub
Sep 09, 2019
Browse files
Merge pull request #1 from SKRohit/SKRohit-patch-1
changes in return statement of evaluate function
parents
84d346b6
e5df3639
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
examples/run_lm_finetuning.py
examples/run_lm_finetuning.py
+1
-2
No files found.
examples/run_lm_finetuning.py
View file @
4b082bd4
...
@@ -247,7 +247,6 @@ def evaluate(args, model, tokenizer, prefix=""):
...
@@ -247,7 +247,6 @@ def evaluate(args, model, tokenizer, prefix=""):
# Loop to handle MNLI double evaluation (matched, mis-matched)
# Loop to handle MNLI double evaluation (matched, mis-matched)
eval_output_dir
=
args
.
output_dir
eval_output_dir
=
args
.
output_dir
results
=
{}
eval_dataset
=
load_and_cache_examples
(
args
,
tokenizer
,
evaluate
=
True
)
eval_dataset
=
load_and_cache_examples
(
args
,
tokenizer
,
evaluate
=
True
)
if
not
os
.
path
.
exists
(
eval_output_dir
)
and
args
.
local_rank
in
[
-
1
,
0
]:
if
not
os
.
path
.
exists
(
eval_output_dir
)
and
args
.
local_rank
in
[
-
1
,
0
]:
...
@@ -289,7 +288,7 @@ def evaluate(args, model, tokenizer, prefix=""):
...
@@ -289,7 +288,7 @@ def evaluate(args, model, tokenizer, prefix=""):
logger
.
info
(
" %s = %s"
,
key
,
str
(
result
[
key
]))
logger
.
info
(
" %s = %s"
,
key
,
str
(
result
[
key
]))
writer
.
write
(
"%s = %s
\n
"
%
(
key
,
str
(
result
[
key
])))
writer
.
write
(
"%s = %s
\n
"
%
(
key
,
str
(
result
[
key
])))
return
result
s
return
result
def
main
():
def
main
():
...
...
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