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

TPUSpawn + IterableDataset error message #6875

Merged

Conversation

ethanwharris
Copy link
Member

@ethanwharris ethanwharris commented Apr 7, 2021

What does this PR do?

Adds a more firendly error message when using iterable dataset + TPUSpawn (currently this fails inside torch XLA here: https://github.com/pytorch/xla/blob/86463f894eb21f31dcd3449e4e55cc45b8a8586a/torch_xla/distributed/parallel_loader.py#L89)

See example outputs here: https://colab.research.google.com/drive/1fXtIfIemyzuF2Flxvyjd0aHz6zL8u5AE?usp=sharing

Would be nice if this could happen on just one rank (perhaps switching to rank_zero_warn?), can't happen pre-accelerator as needs the dataloaders to actually exist

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs) PL Slack
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [N/A] Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • [N/A] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@ethanwharris ethanwharris marked this pull request as ready for review April 7, 2021 20:12
@ethanwharris ethanwharris marked this pull request as draft April 7, 2021 20:13
@ethanwharris
Copy link
Member Author

@tchaton Thanks for the review 😃 I've added an earlier message when the dataloaders are passed to fit and some tests, mind re-reviewing?

@ethanwharris ethanwharris marked this pull request as ready for review April 8, 2021 08:35
Copy link
Contributor

@kaushikb11 kaushikb11 left a comment

Choose a reason for hiding this comment

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

LGTM!

@awaelchli awaelchli added bug Something isn't working accelerator: tpu Tensor Processing Unit labels Apr 8, 2021
ethanwharris and others added 2 commits April 8, 2021 13:02
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
@kaushikb11 kaushikb11 added this to the 1.2.x milestone Apr 8, 2021
@kaushikb11 kaushikb11 merged commit 1c2ecbf into Lightning-AI:master Apr 8, 2021
@SeanNaren SeanNaren mentioned this pull request Apr 12, 2021
SeanNaren pushed a commit that referenced this pull request Apr 13, 2021
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

(cherry picked from commit 1c2ecbf)
lexierule pushed a commit that referenced this pull request Apr 14, 2021
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

(cherry picked from commit 1c2ecbf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accelerator: tpu Tensor Processing Unit bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants