testing single process ddp

This commit is contained in:
William Falcon 2019-07-18 15:06:20 -04:00
parent 112be99b19
commit 59d60eaf18
1 changed files with 1 additions and 2 deletions

View File

@ -375,8 +375,7 @@ class Trainer(TrainerIO):
print('using ddp')
# must copy only the meta of the exp so it survives pickle/unpickle when going to new process
self.experiment = self.experiment.get_meta_copy()
task = os.environ['SLURM_LOCALID']
print(f'task: {task}')
task = int(os.environ['SLURM_LOCALID'])
self.ddp_train(task, model)
# mp.spawn(self.ddp_train, nprocs=len(self.data_parallel_device_ids), args=(model, ))