From 3ca1874ca45d999d1a556f6d3524f66dea6454f1 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Mon, 14 Sep 2020 05:54:23 -0700 Subject: [PATCH] [examples testing] restore code (#7099) For some reason https://github.com/huggingface/transformers/pull/5512 re-added temp dir creation code that was removed by https://github.com/huggingface/transformers/pull/6494 defeating the purpose of that PR for those tests. --- examples/requirements.txt | 2 +- examples/test_examples.py | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/examples/requirements.txt b/examples/requirements.txt index 615355ad36..45bb30799a 100644 --- a/examples/requirements.txt +++ b/examples/requirements.txt @@ -15,4 +15,4 @@ pandas datasets fire pytest -conllu \ No newline at end of file +conllu diff --git a/examples/test_examples.py b/examples/test_examples.py index 10e0f0fd30..ae32fc9caa 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -80,10 +80,7 @@ class ExamplesTests(TestCasePlus): --warmup_steps=2 --seed=42 --max_seq_length=128 - """ - output_dir = "./tests/fixtures/tests_samples/temp_dir_{}".format(hash(testargs)) - testargs += "--output_dir " + output_dir - testargs = testargs.split() + """.split() if is_cuda_and_apex_available(): testargs.append("--fp16") @@ -149,10 +146,7 @@ class ExamplesTests(TestCasePlus): --do_train --do_eval --num_train_epochs=1 - """ - output_dir = "./tests/fixtures/tests_samples/temp_dir_{}".format(hash(testargs)) - testargs += "--output_dir " + output_dir - testargs = testargs.split() + """.split() if torch_device != "cuda": testargs.append("--no_cuda")