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
OpenDAS
deepspeed
Commits
3cecbc1d
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "4ace7d0483d9b5016575a2d51119c33172c005ed"
Commit
3cecbc1d
authored
Feb 01, 2021
by
Jeff Rasley
Browse files
properly set engine.local_rank if it's set to -1
parent
5e522efc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
deepspeed/runtime/engine.py
deepspeed/runtime/engine.py
+4
-4
No files found.
deepspeed/runtime/engine.py
View file @
3cecbc1d
...
@@ -458,10 +458,10 @@ class DeepSpeedEngine(Module):
...
@@ -458,10 +458,10 @@ class DeepSpeedEngine(Module):
# Configure based on command line arguments
# Configure based on command line arguments
def
_configure_with_arguments
(
self
,
args
,
mpu
):
def
_configure_with_arguments
(
self
,
args
,
mpu
):
self
.
local_rank
=
args
.
local_rank
if
hasattr
(
if
hasattr
(
args
,
'
local_rank
'
)
and
args
.
local_rank
>=
0
:
args
,
self
.
local_rank
=
args
.
local_rank
'local_rank'
)
else
int
(
os
.
environ
.
get
(
"LOCAL_RANK"
,
else
:
-
1
))
self
.
local_rank
=
int
(
os
.
environ
.
get
(
"LOCAL_RANK"
,
-
1
))
config_file
=
args
.
deepspeed_config
if
hasattr
(
args
,
config_file
=
args
.
deepspeed_config
if
hasattr
(
args
,
'deepspeed_config'
)
else
None
'deepspeed_config'
)
else
None
...
...
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