From c6e18de9f86bc543937cfc558e3d28fedf5a08cb Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Fri, 9 Oct 2020 20:01:15 -0400 Subject: [PATCH] Fix flaky test in test_trainer (#7689) --- tests/test_trainer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_trainer.py b/tests/test_trainer.py index 81694b7fbeb..eb23e7eb1af 100755 --- a/tests/test_trainer.py +++ b/tests/test_trainer.py @@ -195,7 +195,9 @@ class TrainerIntegrationTest(unittest.TestCase): args = TrainingArguments("./regression") dict1, dict2 = args.to_dict(), trainer.args.to_dict() for key in dict1.keys(): - self.assertEqual(dict1[key], dict2[key]) + # Logging dir can be slightly different as they default to something with the time. + if key != "loggin_dir": + self.assertEqual(dict1[key], dict2[key]) def test_reproducible_training(self): # Checks that training worked, model trained and seed made a reproducible training.