testing master_Addr flag

This commit is contained in:
William Falcon
2019-07-12 11:55:14 -04:00
parent 6dde1d7ae3
commit 885bad3555
+5 -2
View File
@@ -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):