From 9ccfc7bd3339f448c5afc879229be691c82a2fca Mon Sep 17 00:00:00 2001 From: William Falcon Date: Sat, 13 Jul 2019 22:03:36 -0400 Subject: [PATCH] added fallback local init --- 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 b27996a7..deccaabf 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -291,7 +291,7 @@ class Trainer(TrainerIO): # when using gpus, first thing we do is spawn a new process between each worker # applies to single gpu, multi-gpu and multi-nodes - if self.on_gpu: + if self.on_gpu and len(self.data_parallel_device_ids) > 1: self.experiment = self.experiment.get_meta_copy() mp.spawn(self.dp_train, nprocs=len(self.data_parallel_device_ids), args=(model, )) else: