From faa2d4fa8b48ae974c4b573b6ebcb7ebd5796066 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Fri, 12 Jul 2019 16:23:20 -0400 Subject: [PATCH] fixed nccl init --- pytorch_lightning/models/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 6e0e9591..68658c61 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -376,7 +376,7 @@ class Trainer(TrainerIO): :return: """ try: - os.environ['MASTER_PORT'] + port = os.environ['MASTER_PORT'] except Exception as e: port = 12910 os.environ['MASTER_PORT'] = f'{port}'