-
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
Add profiling for on_load_checkpoint
/on_save_checkpoint
callback and LM hooks
#12149
Add profiling for on_load_checkpoint
/on_save_checkpoint
callback and LM hooks
#12149
Conversation
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.
Edit: #12149 (comment)
@akashkw Thanks. I think I should be adding on_save_checkpoint and on_load_checkpoint to this dictionary in this test: but when I do I still get an error :/ https://gist.github.com/daniellepintz/025a8870a63b40b83c6d042c0831de98 Does anyone have any insight on this? |
@daniellepintz - Probably, you want to change the following 2 lines: "on_save_checkpoint": None,
"on_load_checkpoint": None, to: "on_save_checkpoint": _LogOptions(
allowed_on_step=(False, True), allowed_on_epoch=(False, True), default_on_step=True, default_on_epoch=False
),
"on_load_checkpoint": _LogOptions(
allowed_on_step=(False, True), allowed_on_epoch=(False, True), default_on_step=True, default_on_epoch=False
), |
@krshrimali thanks! Just want to double check if we want to change the behavior and allow logging inside these hooks, cc @carmocca |
Please don't. I'll take a look at the current failing tests. |
_call_lightning_module_hook
in checkpoint_connector
on_load_checkpoint
/on_save_checkpoint
callback and LM hooks
…lightning into checkpoint_connector
…lightning into checkpoint_connector
…lightning into checkpoint_connector
for more information, see https://pre-commit.ci
What does this PR do?
For the LM hooks we can simply call
_call_lightning_module_hook
to get profiling.For the callback hooks, we have dedicated functions with special logic - I added profiling there.
Does your PR introduce any breaking changes? If yes, please list them.
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 🙃