Skip to content

Commit

Permalink
fixed default sampler (#1425)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon committed Apr 9, 2020
1 parent b5c6d0e commit 21a1972
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pytorch_lightning/trainer/data_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down

0 comments on commit 21a1972

Please sign in to comment.