Skip to content

Commit

Permalink
Merge pull request #1 from SKRohit/SKRohit-patch-1
Browse files Browse the repository at this point in the history
changes in return statement of evaluate function
  • Loading branch information
SKRohit authored Sep 9, 2019
2 parents 84d346b + e5df363 commit 4b082bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/run_lm_finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ def evaluate(args, model, tokenizer, prefix=""):
# Loop to handle MNLI double evaluation (matched, mis-matched)
eval_output_dir = args.output_dir

results = {}
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]:
Expand Down Expand Up @@ -289,7 +288,7 @@ def evaluate(args, model, tokenizer, prefix=""):
logger.info(" %s = %s", key, str(result[key]))
writer.write("%s = %s\n" % (key, str(result[key])))

return results
return result


def main():
Expand Down

0 comments on commit 4b082bd

Please sign in to comment.