Skip to content

Commit

Permalink
Fix flakey test with seed (huggingface#20318)
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerzr authored and Magnus Pierrau committed Dec 15, 2022
1 parent 5d2c1db commit 78e64cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/pytorch/test_accelerate_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import torch

from accelerate.utils import write_basic_config
from transformers.testing_utils import TestCasePlus, get_gpu_count, is_flaky, run_command, slow, torch_device
from transformers.testing_utils import TestCasePlus, get_gpu_count, run_command, slow, torch_device
from transformers.utils import is_apex_available


Expand Down Expand Up @@ -176,7 +176,6 @@ def test_run_ner_no_trainer(self):
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "epoch_0")))
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "ner_no_trainer")))

@is_flaky()
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline"})
def test_run_squad_no_trainer(self):
tmp_dir = self.get_auto_remove_tmp_dir()
Expand All @@ -187,6 +186,7 @@ def test_run_squad_no_trainer(self):
--train_file tests/fixtures/tests_samples/SQUAD/sample.json
--validation_file tests/fixtures/tests_samples/SQUAD/sample.json
--output_dir {tmp_dir}
--seed=42
--max_train_steps=10
--num_warmup_steps=2
--learning_rate=2e-4
Expand Down

0 comments on commit 78e64cf

Please sign in to comment.