Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataLoader] Add context to NotImplementedErrors in dataset.py #100667

Closed
wants to merge 1 commit into from

Conversation

cshimmin
Copy link
Contributor

@cshimmin cshimmin commented May 4, 2023

Add helpful context message to NotImplementedError's thrown by Dataset and IterableDataset, reminding users that they must implement __getitem__/__iter__ in subclasses. Currently, users are presented with a bare NotImplementedError without describing the remedy.

Add helpful context message to `NotImplementedError`'s thrown by Dataset and IterableDataset, reminding users that they must implement `__getitem__`/`__iter__` in subclasses. Currently, users are presented with a bare `NotImplementedError` without describing the remedy.
@pytorch-bot pytorch-bot bot added the release notes: dataloader release notes category label May 4, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 4, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: cshimmin / name: Chase (7ecd6e0)

Copy link
Contributor

@NivekT NivekT left a comment

Choose a reason for hiding this comment

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

This seems reasonable to me. Thanks for adding them!

@NivekT NivekT changed the title Add context to NotImplementedErrors in dataset.py [DataLoader] Add context to NotImplementedErrors in dataset.py May 5, 2023
@NivekT NivekT added the topic: improvements topic category label May 5, 2023
@NivekT
Copy link
Contributor

NivekT commented May 5, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 5, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

kiersten-stokes pushed a commit to kiersten-stokes/pytorch that referenced this pull request May 8, 2023
…ch#100667)

Add helpful context message to `NotImplementedError`'s thrown by Dataset and IterableDataset, reminding users that they must implement `__getitem__`/`__iter__` in subclasses. Currently, users are presented with a bare `NotImplementedError` without describing the remedy.
Pull Request resolved: pytorch#100667
Approved by: https://github.com/NivekT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: dataloader release notes category topic: improvements topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants