From f52a15897b46ffa40af5c96d3726f0e18e91879b Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Sat, 27 Feb 2021 08:21:50 -0800 Subject: [PATCH] [run_seq2seq.py] restore functionality: saving to test_generations.txt (#10428) This PR restores the original functionality that for some reason was modified. Fixes: https://github.com/huggingface/transformers/issues/10381 @sgugger --- examples/seq2seq/run_seq2seq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/seq2seq/run_seq2seq.py b/examples/seq2seq/run_seq2seq.py index 2a060dac52..f399489e1d 100755 --- a/examples/seq2seq/run_seq2seq.py +++ b/examples/seq2seq/run_seq2seq.py @@ -629,7 +629,7 @@ def main(): 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))