Skip to content

Commit

Permalink
[run_seq2seq.py] restore functionality: saving to test_generations.txt (
Browse files Browse the repository at this point in the history
#10428)

This PR restores the original functionality that for some reason was modified.

Fixes: #10381

@sgugger
  • Loading branch information
stas00 authored Feb 27, 2021
1 parent 311b704 commit f52a158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/seq2seq/run_seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def compute_metrics(eval_preds):
test_results.predictions, skip_special_tokens=True, clean_up_tokenization_spaces=True
)
test_preds = [pred.strip() for pred in test_preds]
output_test_preds_file = os.path.join(training_args.output_dir, "test_preds_seq2seq.txt")
output_test_preds_file = os.path.join(training_args.output_dir, "test_generations.txt")
with open(output_test_preds_file, "w") as writer:
writer.write("\n".join(test_preds))

Expand Down

0 comments on commit f52a158

Please sign in to comment.