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

Remove rank_zero_only on DataModule prepare_data #7945

Merged
merged 3 commits into from
Jun 12, 2021
Merged

Remove rank_zero_only on DataModule prepare_data #7945

merged 3 commits into from
Jun 12, 2021

Conversation

Queuecumber
Copy link
Contributor

@Queuecumber Queuecumber commented Jun 11, 2021

What does this PR do?

Fixes #7927

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • 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?
  • 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?
  • 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 🙃

@Queuecumber
Copy link
Contributor Author

cc @awaelchli

@Queuecumber
Copy link
Contributor Author

I was looking into adding new tests but it looks like there are already decent tests for can_prepare_data, the problem is that they never actually called prepare_data to see if it worked. We could add new tests to actually call the underlying prepare_data to cover these cases if you want.

@carmocca carmocca added bug Something isn't working data handling Generic data-related topic labels Jun 11, 2021
@carmocca carmocca added this to the v1.3.x milestone Jun 11, 2021
@carmocca
Copy link
Contributor

Thanks for the fix!

the problem is that they never actually called prepare_data to see if it worked. We could add new tests to actually call the underlying prepare_data to cover these cases if you want.

Yes, this would be valuable.
Also, remember to update the CHANGELOG.md 👍

@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #7945 (a6fd8fe) into master (42c7f27) will decrease coverage by 6%.
The diff coverage is 100%.

❗ Current head a6fd8fe differs from pull request most recent head 22da0d3. Consider uploading reports for the commit 22da0d3 to get more accurate results

@@           Coverage Diff           @@
##           master   #7945    +/-   ##
=======================================
- Coverage      92%     87%    -6%     
=======================================
  Files         200     203     +3     
  Lines       12842   13129   +287     
=======================================
- Hits        11868   11398   -470     
- Misses        974    1731   +757     

Signed-off-by: Max Ehrlich <[email protected]>
@pep8speaks
Copy link

pep8speaks commented Jun 11, 2021

Hello @Queuecumber! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-06-11 17:20:35 UTC

@Queuecumber
Copy link
Contributor Author

OK changelog and tests updated

@awaelchli awaelchli added the ready PRs ready to be merged label Jun 11, 2021
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

thanks for extending the tests, great fix. Running tests now.

@Queuecumber
Copy link
Contributor Author

I see the failing mypy check and I'll look into it ASAP

@awaelchli awaelchli merged commit 6856cce into Lightning-AI:master Jun 12, 2021
@awaelchli
Copy link
Contributor

@Queuecumber thanks for the fix
The mypy failure is unrelated to your changes

@carmocca carmocca mentioned this pull request Jun 15, 2021
carmocca pushed a commit that referenced this pull request Jun 15, 2021
lexierule pushed a commit that referenced this pull request Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data handling Generic data-related topic ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataModule PrepareData Only Called on Node 0
6 participants