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
9edff453
Unverified
Commit
9edff453
authored
Jul 20, 2022
by
Yih-Dar
Committed by
GitHub
Jul 20, 2022
Browse files
skip some test_multi_gpu_data_parallel_forward (#18188)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
bc6fe6fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
tests/models/beit/test_modeling_beit.py
tests/models/beit/test_modeling_beit.py
+6
-1
tests/models/data2vec/test_modeling_data2vec_vision.py
tests/models/data2vec/test_modeling_data2vec_vision.py
+8
-1
No files found.
tests/models/beit/test_modeling_beit.py
View file @
9edff453
...
@@ -23,7 +23,7 @@ from packaging import version
...
@@ -23,7 +23,7 @@ from packaging import version
from
transformers
import
BeitConfig
from
transformers
import
BeitConfig
from
transformers.models.auto
import
get_values
from
transformers.models.auto
import
get_values
from
transformers.testing_utils
import
require_torch
,
require_vision
,
slow
,
torch_device
from
transformers.testing_utils
import
require_torch
,
require_torch_multi_gpu
,
require_vision
,
slow
,
torch_device
from
transformers.utils
import
cached_property
,
is_torch_available
,
is_vision_available
from
transformers.utils
import
cached_property
,
is_torch_available
,
is_vision_available
from
...test_configuration_common
import
ConfigTester
from
...test_configuration_common
import
ConfigTester
...
@@ -212,6 +212,11 @@ class BeitModelTest(ModelTesterMixin, unittest.TestCase):
...
@@ -212,6 +212,11 @@ class BeitModelTest(ModelTesterMixin, unittest.TestCase):
def
test_inputs_embeds
(
self
):
def
test_inputs_embeds
(
self
):
pass
pass
@
require_torch_multi_gpu
@
unittest
.
skip
(
reason
=
"BEiT has some layers using `add_module` which doesn't work well with `nn.DataParallel`"
)
def
test_multi_gpu_data_parallel_forward
(
self
):
pass
def
test_model_common_attributes
(
self
):
def
test_model_common_attributes
(
self
):
config
,
_
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
config
,
_
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
...
...
tests/models/data2vec/test_modeling_data2vec_vision.py
View file @
9edff453
...
@@ -20,7 +20,7 @@ import unittest
...
@@ -20,7 +20,7 @@ import unittest
from
transformers
import
Data2VecVisionConfig
from
transformers
import
Data2VecVisionConfig
from
transformers.models.auto
import
get_values
from
transformers.models.auto
import
get_values
from
transformers.testing_utils
import
require_torch
,
require_vision
,
slow
,
torch_device
from
transformers.testing_utils
import
require_torch
,
require_torch_multi_gpu
,
require_vision
,
slow
,
torch_device
from
transformers.utils
import
cached_property
,
is_torch_available
,
is_vision_available
from
transformers.utils
import
cached_property
,
is_torch_available
,
is_vision_available
from
...test_configuration_common
import
ConfigTester
from
...test_configuration_common
import
ConfigTester
...
@@ -194,6 +194,13 @@ class Data2VecVisionModelTest(ModelTesterMixin, unittest.TestCase):
...
@@ -194,6 +194,13 @@ class Data2VecVisionModelTest(ModelTesterMixin, unittest.TestCase):
# Data2VecVision does not use inputs_embeds
# Data2VecVision does not use inputs_embeds
pass
pass
@
require_torch_multi_gpu
@
unittest
.
skip
(
reason
=
"Data2VecVision has some layers using `add_module` which doesn't work well with `nn.DataParallel`"
)
def
test_multi_gpu_data_parallel_forward
(
self
):
pass
def
test_model_common_attributes
(
self
):
def
test_model_common_attributes
(
self
):
config
,
_
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
config
,
_
=
self
.
model_tester
.
prepare_config_and_inputs_for_common
()
...
...
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