added single node example

This commit is contained in:
William Falcon
2019-07-08 17:31:47 -04:00
parent bd43c4417f
commit c750015c80
+5 -1
View File
@@ -289,7 +289,11 @@ class Trainer(TrainerIO):
:return:
"""
# node rank using relative slurm id
node_rank = int(os.environ['SLURM_NODEID'])
# otherwise default to node rank 0
try:
node_rank = int(os.environ['SLURM_NODEID'])
except KeyError as e:
node_rank = 0
# recover original exp before went into process
self.experiment = self.experiment.get_non_ddp_exp()