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
257a3513
Commit
257a3513
authored
Nov 30, 2018
by
thomwolf
Browse files
fix pickle dump in run_squad example
parent
3951c2c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/run_squad.py
examples/run_squad.py
+1
-1
No files found.
examples/run_squad.py
View file @
257a3513
...
@@ -878,7 +878,7 @@ def main():
...
@@ -878,7 +878,7 @@ def main():
if
args
.
local_rank
==
-
1
or
torch
.
distributed
.
get_rank
()
==
0
:
if
args
.
local_rank
==
-
1
or
torch
.
distributed
.
get_rank
()
==
0
:
logger
.
info
(
" Saving train features into cached file %s"
,
cached_train_features_file
)
logger
.
info
(
" Saving train features into cached file %s"
,
cached_train_features_file
)
with
open
(
cached_train_features_file
,
"wb"
)
as
writer
:
with
open
(
cached_train_features_file
,
"wb"
)
as
writer
:
train_features
=
pickle
.
dump
(
train_features
,
writer
)
pickle
.
dump
(
train_features
,
writer
)
logger
.
info
(
"***** Running training *****"
)
logger
.
info
(
"***** Running training *****"
)
logger
.
info
(
" Num orig examples = %d"
,
len
(
train_examples
))
logger
.
info
(
" Num orig examples = %d"
,
len
(
train_examples
))
logger
.
info
(
" Num split examples = %d"
,
len
(
train_features
))
logger
.
info
(
" Num split examples = %d"
,
len
(
train_features
))
...
...
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