"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "fbb454307dd60e071273ac741a6074ebccbc6d1a"
Unverified Commit f52a1589 authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

[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
parent 311b7048
...@@ -629,7 +629,7 @@ def main(): ...@@ -629,7 +629,7 @@ def main():
test_results.predictions, skip_special_tokens=True, clean_up_tokenization_spaces=True test_results.predictions, skip_special_tokens=True, clean_up_tokenization_spaces=True
) )
test_preds = [pred.strip() for pred in test_preds] 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: with open(output_test_preds_file, "w") as writer:
writer.write("\n".join(test_preds)) writer.write("\n".join(test_preds))
......
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