From 6a1199b7970818d29b6dfc88073644a84277ae91 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Mon, 8 Jul 2019 12:32:48 -0400 Subject: [PATCH] added multi-node locked ip search --- 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 10e90bda..b8e0a676 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -365,7 +365,7 @@ class Trainer(TrainerIO): # every process writes their process id + ip to a shared file my_ip = subprocess.run(['hostname', '-I'], stdout=subprocess.PIPE).stdout.decode('utf-8') my_ip = my_ip.split(' ')[0] - to_write = f'{my_ip}' + to_write = f'{my_ip}\n' # save the ip to the file # block file so only one process can access at a time