-
Notifications
You must be signed in to change notification settings - Fork 21
Add support for optimizer checkpointing #579
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #579 +/- ##
==========================================
- Coverage 93.58% 93.55% -0.04%
==========================================
Files 92 92
Lines 6123 6182 +59
==========================================
+ Hits 5730 5783 +53
- Misses 393 399 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
admm0.solve() | ||
with tempfile.TemporaryDirectory() as tmpdir: | ||
path = os.path.join(tmpdir, "admm.npz") | ||
admm0.save_state(path) | ||
admm0.solve() |
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.
Why is admm0.solve()
called twice?
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 sequence is as follows:
- Solve 5 iterations of
admm0
. - Save
admm0
state. - Solve another 5 iterations of
admm0
. - Initialize
admm1
with state ofadmm0
after 5 iterations. - Solve another 5 iterations of
admm1
. - Compare results for
admm0
andadmm
.
The idea is that the additional 5 iterations after saving the state allow the solutions to diverge if any component of the state is not properly saved, so that the final test can just be on the solution rather than on all state components.
Add support for optimizer checkpointing. Also bump supported
jaxlib
/jax
versions and address issues in docs.