mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-30 13:40:46 +08:00
cleaning up demos
This commit is contained in:
1 parent
5c99da5861
commit
a00e24ed80
1 file changed
+2
-1
@@ -919,7 +919,7 @@ class Trainer(TrainerIO):
|
||||
|
||||
# if user gave a port number, use that one instead
|
||||
try:
|
||||
port = os.environ['MASTER_PORT']
|
||||
default_port = os.environ['MASTER_PORT']
|
||||
except Exception:
|
||||
os.environ['MASTER_PORT'] = str(default_port)
|
||||
|
||||
@@ -931,6 +931,7 @@ class Trainer(TrainerIO):
|
||||
|
||||
root_node = self.resolve_root_node_address(root_node)
|
||||
os.environ['MASTER_ADDR'] = root_node
|
||||
print(default_port)
|
||||
|
||||
dist.init_process_group("nccl", rank=self.proc_rank, world_size=self.world_size)
|
||||
|
||||
|
||||
Reference in new issue
Block a user