Add setup for TPU CI to run every hour. (#6219)

* Add setup for TPU CI to run every hour.

* Re-organize config.yml

Co-authored-by: Lysandre <lysandre.debut@reseau.eseo.fr>
This commit is contained in:
zcain117
2020-08-07 08:17:07 -07:00
committed by GitHub
parent 6695450a23
commit 1b8a7ffcfd
6 changed files with 253 additions and 15 deletions

View File

@@ -14,7 +14,6 @@
# limitations under the License.
import argparse
import logging
import sys
import unittest
@@ -29,13 +28,6 @@ logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger()
def get_setup_file():
parser = argparse.ArgumentParser()
parser.add_argument("-f")
args = parser.parse_args()
return args.f
@require_torch_tpu
class TorchXLAExamplesTests(unittest.TestCase):
def test_run_glue(self):
@@ -47,13 +39,13 @@ class TorchXLAExamplesTests(unittest.TestCase):
output_directory = "run_glue_output"
testargs = f"""
text-classification/run_glue.py
transformers/examples/text-classification/run_glue.py
--num_cores=8
text-classification/run_glue.py
transformers/examples/text-classification/run_glue.py
--do_train
--do_eval
--task_name=MRPC
--data_dir=../glue_data/MRPC
--data_dir=/datasets/glue_data/MRPC
--cache_dir=./cache_dir
--num_train_epochs=1
--max_seq_length=128
@@ -87,5 +79,5 @@ class TorchXLAExamplesTests(unittest.TestCase):
# Assert that the model trains
self.assertGreaterEqual(value, 0.70)
# Assert that the script takes less than 100 seconds to make sure it doesn't hang.
self.assertLess(end - start, 100)
# Assert that the script takes less than 300 seconds to make sure it doesn't hang.
self.assertLess(end - start, 300)