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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
add DETAIL logs for batch use cases #11008
Conversation
af1d345
to
a1d794b
Compare
a1d794b
to
4e0ece5
Compare
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.
Looks great !
1bc4396
to
bb72db5
Compare
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.
Requesting changes for a final review when it's all ready :)
936a97a
to
80c19d0
Compare
010315c
to
44d46e3
Compare
d63b7fb
to
f0a97ba
Compare
for more information, see https://pre-commit.ci
log.detail(f"{self.__class__.__name__}: restoring training state") | ||
self.checkpoint_connector.restore_training_state() |
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.
I disagree with most changes in this PR. Instead of moving the log calls into the actual methods, this is now littering the trainer with more code that is irrelevant to the reader. Our goal is to make the Trainer more readable and easier to trace steps for contributors and researchers who are curious. This PR is going in the wrong direction IMO.
Please reconsider this, I feel very strongly about this.
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.
cc @PyTorchLightning/core-lightning
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.
The choice of logging in the caller vs the callee is as old as logging has existed and it is a tradeoff between flexibility vs convenience.
I don't think these log calls make the Trainer unreadable, as they are just glorified prints. You could see their value as a replacement for comments.
Please reconsider this, I feel very strongly about this.
However, I don't feel very strongly about it, so if you do, I'm okay with changing these.
What does this PR do?
Fixes #10975
Does your PR introduce any breaking changes? If yes, please list them.
None
Before submitting
PR review
Anyone in the community is welcome to review the PR.
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 馃檭