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):