-
Notifications
You must be signed in to change notification settings - Fork 27.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
Enforce saving at end of training if saving option chosen #30160
Conversation
We can certainly make this configurable as an arg, but I'm not sure it makes sense to do this |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Thanks for working on this! Agreed I think always saving on the last step is a good idea.
Just some questions about the tests
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.
Thank you, @muellerzr, for enabling the model to be saved at the end of training when using --save_steps
strategy. Left a nit.
@amyeroberts good for a rereview, no functional changes happened just switched out the test logic to be more obvious what's going on |
cc684e5
to
9bbb268
Compare
ef951dc
to
4002cb8
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.
Thanks for adding!
* Enforce saving at end of training * Fix test * Rework test * Fixup tests' * Update comment based on sourab feedback * Clean
* Enforce saving at end of training * Fix test * Rework test * Fixup tests' * Update comment based on sourab feedback * Clean
* Enforce saving at end of training * Fix test * Rework test * Fixup tests' * Update comment based on sourab feedback * Clean
* Enforce saving at end of training * Fix test * Rework test * Fixup tests' * Update comment based on sourab feedback * Clean
…e#30160) * Enforce saving at end of training * Fix test * Rework test * Fixup tests' * Update comment based on sourab feedback * Clean
What does this PR do?
Currently we save at the end of training if an
epoch
strategy is chosen, but not if asteps
strategy is chosen. This can be undesireable because the end of a users training might not be saved at all, sometimes upwards of 10% as seen here: #28539This PR mimics the behavior of
epoch
, by choosing to save the model at the end of training as well ifsteps
is chosen.I do not believe it makes sense to make this configurable, because a user should always have access to the end-resulting model when training!
Fixes #28539
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@amyeroberts @pacman100