auto port kill before starting ddp

This commit is contained in:
William Falcon 2019-07-24 14:38:09 -04:00
parent 446a44b085
commit 5439dc0844
1 changed files with 1 additions and 1 deletions

View File

@ -567,7 +567,7 @@ class Trainer(TrainerIO):
try:
port = os.environ['MASTER_PORT']
except Exception as e:
port = self.default_ddp_port
port = 12910
os.environ['MASTER_PORT'] = f'{port}'
self._ddp_port = port