From cefc27112dabd5cf2e0c7e9155f7480746a88a7b Mon Sep 17 00:00:00 2001 From: William Falcon Date: Sat, 13 Jul 2019 22:28:08 -0400 Subject: [PATCH] ddp flag change --- 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 f82d4ca2..bc03fabe 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -273,7 +273,7 @@ class Trainer(TrainerIO): self.test_dataloader = model.test_dataloader self.val_dataloader = model.val_dataloader - if self.on_gpu and type(self.tng_dataloader.sampler) is not DistributedSampler: + if self.data_parallel and type(self.tng_dataloader.sampler) is not DistributedSampler: msg = ''' when using multiple gpus and multiple nodes you must pass a DistributedSampler to DataLoader(sampler).