Skip to content

Conversation

SteiMi
Copy link

@SteiMi SteiMi commented Oct 13, 2019

Changelog:

  • DataLoader argument sampler is now of type Optional[Sampler[int]]instead of Sampler[int]
  • DataLoader argument batch_sampler is now of type Optional[Sampler[Sequence[int]]] instead of Sampler[Sequence[int]]

Fixes #27737

@SteiMi SteiMi requested a review from apaszke as a code owner October 13, 2019 08:22
@pytorchbot pytorchbot added module: dataloader Related to torch.utils.data.DataLoader and Sampler module: typing Related to mypy type annotations labels Oct 13, 2019
Copy link
Collaborator

@ssnl ssnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@ssnl
Copy link
Collaborator

ssnl commented Oct 13, 2019

@pytorchbot merge this please

@pytorchbot pytorchbot added the merge-this-please Was marked for merge with @pytorchbot merge this please label Oct 13, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in 4bcedb6.

thiagocrepaldi pushed a commit to thiagocrepaldi/pytorch that referenced this pull request Feb 4, 2020
…r interface (pytorch#27821)

Summary:
Changelog:

- DataLoader argument `sampler` is now of type `Optional[Sampler[int]]`instead of `Sampler[int]`
- DataLoader argument `batch_sampler` is now of type `Optional[Sampler[Sequence[int]]]` instead of `Sampler[Sequence[int]]`

Fixes pytorch#27737
Pull Request resolved: pytorch#27821

Differential Revision: D17906623

Pulled By: ezyang

fbshipit-source-id: 088cacbb7e9f7988995f40b71adc3e719815f5ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-this-please Was marked for merge with @pytorchbot merge this please Merged module: dataloader Related to torch.utils.data.DataLoader and Sampler module: typing Related to mypy type annotations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong type in DataLoader interface?

5 participants