Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
9d1ef009
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "41f3b83b13db67d02ac82b5fcacf6fc631842329"
Unverified
Commit
9d1ef009
authored
Nov 18, 2022
by
Zachary Mueller
Committed by
GitHub
Nov 18, 2022
Browse files
Fix flakey test with seed (#20318)
parent
8e777b3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/pytorch/test_accelerate_examples.py
examples/pytorch/test_accelerate_examples.py
+2
-2
No files found.
examples/pytorch/test_accelerate_examples.py
View file @
9d1ef009
...
...
@@ -26,7 +26,7 @@ from unittest import mock
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
...
...
@@ -176,7 +176,6 @@ class ExamplesTestsNoTrainer(TestCasePlus):
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
()
...
...
@@ -187,6 +186,7 @@ class ExamplesTestsNoTrainer(TestCasePlus):
--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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment