-
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
[feat] Enable self.log in callbacks #5094
Conversation
Hello @tchaton! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-12-14 07:15:11 UTC |
Codecov Report
@@ Coverage Diff @@
## release/1.2-dev #5094 +/- ##
================================================
- Coverage 93% 92% -1%
================================================
Files 134 134
Lines 9907 10023 +116
================================================
+ Hits 9205 9250 +45
- Misses 702 773 +71 |
This pull request is now in conflict... :( |
def attach_model_logging_functions(self, model): | ||
for callback in self.trainer.callbacks: | ||
callback.log = model.log | ||
callback.log_dict = model.log_dict |
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.
Question: should we also allow for callbacks to write predictions aka self.write_prediction
and self.write_prediction_dict
?
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.
Yes, but within another PR :)
This PR breaks some of my callbacks. |
@tchaton please consider adding the stub as above. this also upsets mypy. |
Any plans to revert this? |
What does this PR do?
This PR enables user to call
self.log
directly from the callbacks and notpl_module.log
.Fixes # (issue)
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 🙃