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
45c33ee5
"vscode:/vscode.git/clone" did not exist on "0d91a65e46c30e642d4cc28d702a5a60e8380d5d"
Unverified
Commit
45c33ee5
authored
Feb 01, 2021
by
Jeff Rasley
Committed by
GitHub
Feb 01, 2021
Browse files
local rank of -1 means not set (#720)
parent
6332e313
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
deepspeed/runtime/engine.py
deepspeed/runtime/engine.py
+1
-1
No files found.
deepspeed/runtime/engine.py
View file @
45c33ee5
...
@@ -480,7 +480,7 @@ class DeepSpeedEngine(Module):
...
@@ -480,7 +480,7 @@ class DeepSpeedEngine(Module):
local_rank_err
=
"DeepSpeed requires a command line parameter of --local_rank [int] and/or setting the LOCAL_RANK environment variable."
local_rank_err
=
"DeepSpeed requires a command line parameter of --local_rank [int] and/or setting the LOCAL_RANK environment variable."
if
hasattr
(
args
,
'local_rank'
):
if
hasattr
(
args
,
'local_rank'
):
assert
type
(
args
.
local_rank
)
==
int
,
local_rank_err
assert
type
(
args
.
local_rank
)
==
int
,
local_rank_err
if
"LOCAL_RANK"
in
os
.
environ
:
if
"LOCAL_RANK"
in
os
.
environ
and
args
.
local_rank
>=
0
:
env_local_rank
=
int
(
os
.
environ
.
get
(
"LOCAL_RANK"
,
-
1
))
env_local_rank
=
int
(
os
.
environ
.
get
(
"LOCAL_RANK"
,
-
1
))
assert
env_local_rank
==
args
.
local_rank
,
\
assert
env_local_rank
==
args
.
local_rank
,
\
f
"Mismatch in local rank setting, args.local_rank=
{
args
.
local_rank
}
but env['LOCAL_RANK']=
{
env_local_rank
}
."
f
"Mismatch in local rank setting, args.local_rank=
{
args
.
local_rank
}
but env['LOCAL_RANK']=
{
env_local_rank
}
."
...
...
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