-
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
consolidate callbacks and hooks #950
consolidate callbacks and hooks #950
Conversation
Thanks! Could you also update the changelog? I forgot to do it in the last PR. |
@hadim sure thing :) |
To do
|
@jeremyjordan let's get this into this release? |
@williamFalcon for sure! would like to wrap this one up tonight |
idk if this is out of scope, but we have the other callbacks which are trainer specific. Do we want to put all of those in the hooks file as well? or structure them differently? No change to the user, just the docs |
@williamFalcon that's a good question. i think those methods make sense where they are in the docs, but i do agree the doc page for LightningModule is pretty lengthy. i do it would really help for readability and quick reference if we could copy the "Shortcuts" panel that PyTorch has in their docs. |
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 🚀, just move tests to a separate file
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.
it would be nice to unify name convention between model and trainer in particular is_function_implemented
in trainer and is_overriden
in model
is there a reason we check for |
@williamFalcon are you still hoping to get this into the next release? |
yup! was focused on the .test thing. will merge today |
just stay tuned, because with some extensive PRs we may come to solving complex collisions 🤖 |
* consolidate callbacks and hooks * ensure callbacks recieve proper arg types * remove model from init callback events * clean up early stopping event * update changelog * remove on_fit_start and on_fit_end * fix args for on_init_start and on_init_end * handle case where early stopping is not used * show all callback methods * wrap checkpoint callback logic into proper class * fix check for main process in checkpoint callback * move callbacks test to separate file * refactor arg checks * get model and call hook on same line * define trainer_options dict in one call * add more asserts to callback test
Before submitting
What does this PR do?
Fixes #947
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃