-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Deprecate write_predictions on the LightningModule #7066
Deprecate write_predictions on the LightningModule #7066
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7066 +/- ##
=======================================
- Coverage 91% 87% -4%
=======================================
Files 198 198
Lines 12633 12635 +2
=======================================
- Hits 11536 11011 -525
- Misses 1097 1624 +527 |
Hey @ananthsub, I was talking with @carmocca and we thought we might want to introduce a We should add properly We also noticed some issues with Should we try to return all ranks results for predict ? Best, |
@tchaton I think it'd make sense to write independently from each rank instead of gathering all results on rank 0. In terms of returning results to users, couldn't the callback contain the return state, similar to how the model checkpoint callback tracks the top K model paths? |
What do we recommend instead of write_predictions? The predict method of Trainer is only for when the model is already trained and needs a dataloader. |
@awaelchli The alternative is #7127 |
I have seen that but is it a replacement? write_predictions was a method that users could use anywhere in their LightningModule (whether we recommend that or not). I have not seen an option for this in #7127. |
@awaelchli users can still use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
27d1515
to
b548862
Compare
What does this PR do?
Fixes #7065
Before submitting
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:
Did you have fun?
Make sure you had fun coding 🙃