Skip to content

Commit

Permalink
fixed ddp flag crash (#3927)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon authored Oct 7, 2020
1 parent 9928125 commit af5887c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/accelerators/ddp_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _call_children_scripts(self):
env_copy['LOCAL_RANK'] = f'{local_rank}'
env_copy['PL_DDP_PID'] = str(self.trainer.data_parallel_device_ids[local_rank])
# remove env var if global seed not set
if os.environ.get('PL_GLOBAL_SEED') is None:
if os.environ.get('PL_GLOBAL_SEED') is None and 'PL_GLOBAL_SEED' in env_copy:
del env_copy['PL_GLOBAL_SEED']

# start process
Expand Down

0 comments on commit af5887c

Please sign in to comment.