Skip to content

Commit

Permalink
fixed default sampler (Lightning-AI#1425)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon authored and tullie committed May 6, 2020
1 parent 56e60b5 commit b0071df
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 b0071df

Please sign in to comment.