Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
61c50634
Unverified
Commit
61c50634
authored
Jun 02, 2021
by
Stas Bekman
Committed by
GitHub
Jun 02, 2021
Browse files
[deepspeed] add nvme test skip rule (#11997)
* add nvme skip rule * fix
parent
640318be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
tests/deepspeed/test_deepspeed.py
tests/deepspeed/test_deepspeed.py
+17
-0
No files found.
tests/deepspeed/test_deepspeed.py
View file @
61c50634
...
@@ -69,6 +69,22 @@ def require_deepspeed(test_case):
...
@@ -69,6 +69,22 @@ def require_deepspeed(test_case):
return
test_case
return
test_case
def
require_deepspeed_aio
(
test_case
):
"""
Decorator marking a test that requires deepspeed aio (nvme)
"""
if
not
is_deepspeed_available
():
return
unittest
.
skip
(
"test requires deepspeed"
)(
test_case
)
import
deepspeed
from
deepspeed.ops.aio
import
AsyncIOBuilder
if
not
deepspeed
.
ops
.
__compatible_ops__
[
AsyncIOBuilder
.
NAME
]:
return
unittest
.
skip
(
"test requires deepspeed async-io"
)(
test_case
)
else
:
return
test_case
if
is_deepspeed_available
():
if
is_deepspeed_available
():
from
deepspeed.utils
import
logger
as
deepspeed_logger
# noqa
from
deepspeed.utils
import
logger
as
deepspeed_logger
# noqa
from
transformers.deepspeed
import
deepspeed_config
,
is_deepspeed_zero3_enabled
# noqa
from
transformers.deepspeed
import
deepspeed_config
,
is_deepspeed_zero3_enabled
# noqa
...
@@ -235,6 +251,7 @@ class TrainerIntegrationDeepSpeed(TestCasePlus, TrainerIntegrationCommon):
...
@@ -235,6 +251,7 @@ class TrainerIntegrationDeepSpeed(TestCasePlus, TrainerIntegrationCommon):
f
"got exception:
{
context
.
exception
}
"
,
f
"got exception:
{
context
.
exception
}
"
,
)
)
@
require_deepspeed_aio
def
test_stage3_nvme_offload
(
self
):
def
test_stage3_nvme_offload
(
self
):
with
mockenv_context
(
**
self
.
dist_env_1_gpu
):
with
mockenv_context
(
**
self
.
dist_env_1_gpu
):
# this actually doesn't have to be on NVMe, any storage will do since this test only
# this actually doesn't have to be on NVMe, any storage will do since this test only
...
...
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