Commit 257a3513 authored by thomwolf's avatar thomwolf
Browse files

fix pickle dump in run_squad example

parent 3951c2c1
...@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment