mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
added single node example
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user