From 885bad35552f3cdc7145ec9300cebe181e3c6174 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Fri, 12 Jul 2019 11:55:14 -0400 Subject: [PATCH] testing master_Addr flag --- pytorch_lightning/models/trainer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 3ede697c..d03d7c18 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -384,8 +384,8 @@ class Trainer(TrainerIO): :return: """ # on one node we use localhost - if nb_gpu_nodes == 1: - return '127.0.0.1' + # if nb_gpu_nodes == 1: + # return '127.0.0.1' # where to store ip_table ip_file_dir = os.path.join(self.cluster.log_path, 'ip_tables') @@ -409,6 +409,9 @@ class Trainer(TrainerIO): return root_ip else: + # sleep 10 seconds first to give file chance to write + sleep(10) + # wait up to 120 seconds until proc 0 writes # once written, read proc 0's address and use it to configure server for i in range(0, 120):