Skip to content

Commit b0071df

Browse files
williamFalcontullie
authored andcommitted
fixed default sampler (Lightning-AI#1425)
1 parent 56e60b5 commit b0071df

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pytorch_lightning/trainer/data_loading.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ def auto_add_sampler(self, dataloader: DataLoader, train: bool) -> DataLoader:
8787
return dataloader
8888

8989
need_dist_sampler = self.use_ddp or self.use_ddp2 or self.use_tpu
90-
no_sampler_added = dataloader.sampler is None
9190

92-
if need_dist_sampler and no_sampler_added:
91+
if need_dist_sampler:
9392

9493
skip_keys = ['sampler', 'batch_sampler', 'dataset_kind']
9594

0 commit comments

Comments
 (0)