"src/vscode:/vscode.git/clone" did not exist on "0bab447670f47c28df60fbd2f6a0f833f75a16f5"
Commit 3cecbc1d authored by Jeff Rasley's avatar Jeff Rasley
Browse files

properly set engine.local_rank if it's set to -1

parent 5e522efc
......@@ -458,10 +458,10 @@ class DeepSpeedEngine(Module):
# Configure based on command line arguments
def _configure_with_arguments(self, args, mpu):
self.local_rank = args.local_rank if hasattr(
args,
'local_rank') else int(os.environ.get("LOCAL_RANK",
-1))
if hasattr(args, 'local_rank') and args.local_rank >= 0:
self.local_rank = args.local_rank
else:
self.local_rank = int(os.environ.get("LOCAL_RANK", -1))
config_file = args.deepspeed_config if hasattr(args,
'deepspeed_config') else None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment