added multi-node proc 0 ip reading

This commit is contained in:
William Falcon
2019-07-08 09:44:20 -04:00
parent 3422f7610b
commit e1823e0d1a
+2 -1
View File
@@ -86,7 +86,6 @@ class Trainer(TrainerIO):
self.lr_schedulers = []
self.amp_level = amp_level
self.print_nan_grads = print_nan_grads
self.data_parallel = gpus is not None and len(gpus) > 0
self.data_parallel_device_ids = gpus
# gpus come in as a string.
@@ -98,6 +97,8 @@ class Trainer(TrainerIO):
else:
self.data_parallel_device_ids = [int(x.strip()) for x in gpus.split(',')]
self.data_parallel = self.data_parallel_device_ids is not None and len(self.data_parallel_device_ids) > 0
# process info
self.proc_rank = 0