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
31ec424b
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "ed2ee373d07aa8fd3f97e5f9fac9649511cf46fd"
Unverified
Commit
31ec424b
authored
Oct 18, 2022
by
amyeroberts
Committed by
GitHub
Oct 18, 2022
Browse files
Add decorator to flaky test (#19674)
parent
a929f81e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
examples/pytorch/test_accelerate_examples.py
examples/pytorch/test_accelerate_examples.py
+2
-1
No files found.
examples/pytorch/test_accelerate_examples.py
View file @
31ec424b
...
@@ -26,7 +26,7 @@ from unittest import mock
...
@@ -26,7 +26,7 @@ from unittest import mock
import
torch
import
torch
from
accelerate.utils
import
write_basic_config
from
accelerate.utils
import
write_basic_config
from
transformers.testing_utils
import
TestCasePlus
,
get_gpu_count
,
run_command
,
slow
,
torch_device
from
transformers.testing_utils
import
TestCasePlus
,
get_gpu_count
,
is_flaky
,
run_command
,
slow
,
torch_device
from
transformers.utils
import
is_apex_available
from
transformers.utils
import
is_apex_available
...
@@ -176,6 +176,7 @@ class ExamplesTestsNoTrainer(TestCasePlus):
...
@@ -176,6 +176,7 @@ 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
,
"epoch_0"
)))
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
tmp_dir
,
"ner_no_trainer"
)))
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
tmp_dir
,
"ner_no_trainer"
)))
@
is_flaky
()
@
mock
.
patch
.
dict
(
os
.
environ
,
{
"WANDB_MODE"
:
"offline"
})
@
mock
.
patch
.
dict
(
os
.
environ
,
{
"WANDB_MODE"
:
"offline"
})
def
test_run_squad_no_trainer
(
self
):
def
test_run_squad_no_trainer
(
self
):
tmp_dir
=
self
.
get_auto_remove_tmp_dir
()
tmp_dir
=
self
.
get_auto_remove_tmp_dir
()
...
...
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