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
3d339ee6
Unverified
Commit
3d339ee6
authored
Apr 13, 2021
by
Stas Bekman
Committed by
GitHub
Apr 13, 2021
Browse files
[Deepspeed] zero3 tests band aid (#11235)
* temp band-aid * style
parent
1ad7b039
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
tests/deepspeed/test_deepspeed.py
tests/deepspeed/test_deepspeed.py
+6
-0
No files found.
tests/deepspeed/test_deepspeed.py
View file @
3d339ee6
...
@@ -115,6 +115,12 @@ class TrainerIntegrationDeepSpeed(TestCasePlus, TrainerIntegrationCommon):
...
@@ -115,6 +115,12 @@ class TrainerIntegrationDeepSpeed(TestCasePlus, TrainerIntegrationCommon):
with
io
.
open
(
self
.
ds_config_file
[
ZERO3
],
"r"
,
encoding
=
"utf-8"
)
as
f
:
with
io
.
open
(
self
.
ds_config_file
[
ZERO3
],
"r"
,
encoding
=
"utf-8"
)
as
f
:
self
.
ds_config_dict
[
ZERO3
]
=
json
.
load
(
f
)
self
.
ds_config_dict
[
ZERO3
]
=
json
.
load
(
f
)
def
tearDown
(
self
):
# XXX: Fixme - this is a temporary band-aid since this global variable impacts other tests
import
transformers
transformers
.
integrations
.
_is_deepspeed_zero3_enabled
=
None
def
get_config_dict
(
self
,
stage
):
def
get_config_dict
(
self
,
stage
):
""" As the tests modify the dict, always make a copy """
""" As the tests modify the dict, always make a copy """
config
=
deepcopy
(
self
.
ds_config_dict
[
stage
])
config
=
deepcopy
(
self
.
ds_config_dict
[
stage
])
...
...
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