From ab5d06a094ad32722018a069c2fb9707d1c6a8b1 Mon Sep 17 00:00:00 2001 From: Patrick von Platen Date: Thu, 2 Apr 2020 12:34:05 +0200 Subject: [PATCH] [T5, examples] replace heavy t5 models with tiny random models (#3556) * replace heavy t5 models with tiny random models as was done by sshleifer * fix isort --- examples/summarization/t5/test_t5_examples.py | 9 ++++++++- examples/translation/t5/test_t5_examples.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/summarization/t5/test_t5_examples.py b/examples/summarization/t5/test_t5_examples.py index cf26ae8892..340ea49d8c 100644 --- a/examples/summarization/t5/test_t5_examples.py +++ b/examples/summarization/t5/test_t5_examples.py @@ -29,7 +29,14 @@ class TestT5Examples(unittest.TestCase): output_file_name = Path(tempfile.gettempdir()) / "utest_output_t5_sum.hypo" score_file_name = Path(tempfile.gettempdir()) / "utest_score_t5_sum.hypo" - testargs = ["evaluate_cnn.py", "t5-small", str(tmp), str(output_file_name), str(tmp), str(score_file_name)] + testargs = [ + "evaluate_cnn.py", + "patrickvonplaten/t5-tiny-random", + str(tmp), + str(output_file_name), + str(tmp), + str(score_file_name), + ] with patch.object(sys, "argv", testargs): run_generate() diff --git a/examples/translation/t5/test_t5_examples.py b/examples/translation/t5/test_t5_examples.py index 6f548e5eb2..b33cba11c2 100644 --- a/examples/translation/t5/test_t5_examples.py +++ b/examples/translation/t5/test_t5_examples.py @@ -37,7 +37,7 @@ class TestT5Examples(unittest.TestCase): testargs = [ "evaluate_wmt.py", - "t5-small", + "patrickvonplaten/t5-tiny-random", str(tmp_source), str(output_file_name), str(tmp_target),