From 3719bacbf6506c79497e00c8a443eab73a876af5 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Thu, 9 Apr 2020 08:42:36 -0400 Subject: [PATCH] fixed default sampler --- pytorch_lightning/trainer/data_loading.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytorch_lightning/trainer/data_loading.py b/pytorch_lightning/trainer/data_loading.py index 66b83fd4bfd00..50e86fd5c7ad2 100644 --- a/pytorch_lightning/trainer/data_loading.py +++ b/pytorch_lightning/trainer/data_loading.py @@ -87,9 +87,8 @@ def auto_add_sampler(self, dataloader: DataLoader, train: bool) -> DataLoader: return dataloader need_dist_sampler = self.use_ddp or self.use_ddp2 or self.use_tpu - no_sampler_added = dataloader.sampler is None - if need_dist_sampler and no_sampler_added: + if need_dist_sampler: skip_keys = ['sampler', 'batch_sampler', 'dataset_kind']