Skip to content

Commit 4b082bd

Browse files
authored
Merge pull request #1 from SKRohit/SKRohit-patch-1
changes in return statement of evaluate function
2 parents 84d346b + e5df363 commit 4b082bd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/run_lm_finetuning.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ def evaluate(args, model, tokenizer, prefix=""):
247247
# Loop to handle MNLI double evaluation (matched, mis-matched)
248248
eval_output_dir = args.output_dir
249249

250-
results = {}
251250
eval_dataset = load_and_cache_examples(args, tokenizer, evaluate=True)
252251

253252
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=""):
289288
logger.info(" %s = %s", key, str(result[key]))
290289
writer.write("%s = %s\n" % (key, str(result[key])))
291290

292-
return results
291+
return result
293292

294293

295294
def main():

0 commit comments

Comments
 (0)