Repository navigation
fix: restore BFGS and LBFGS checkpoint resume - #1731
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BFGS/LBFGS saved scipy OptimizeResult objects but resumed using the nonexistent x0 key. Restore x, persist cumulative total_iterations separately from scipy's per-chunk nit, and return the loaded result when its budget is already exhausted. Preserve the fresh-run fallback for NullPaths and restore saved optimization history when enabled.
Closes #1724.
API Changes
No public signature or output-identifier changes. Existing samples_info total_iterations now reports the cumulative count across chunks. Old checkpoints without that field fall back to their saved nit; the historical cumulative count cannot be reconstructed from those older files. Persistence remains dill, without a new resume_state format.
Validation
Full library suite: 3919 passed, 1 skipped, 1 xfailed (Python 3.12.14). Broader search/conformance/clipper tests: 201 passed. Six new regressions pass for real interrupted BFGS/LBFGS fits, legacy checkpoint counts, and exhausted budgets; all six fail on unchanged main. Author diff review passed. Real scipy fits resume at the saved point and match uninterrupted runs.
No downstream API migration. Actual search.fit interrupt/resume and conformance tests cover both no-output and directory-backed searches; the six-workspace smoke matrix was not run. Required CI remains pending at PR creation.
Heart and authorization
User authorized "Find 4 grouped tasks and do them", then "Yes I authorise" after the RED gate was disclosed. Development PR only; no merge or release. Fresh published vitals: organism RED, PyAutoFit scope GREEN; local readiness STALE (fresh checkout has no release evidence). This does not repair or clear the organism's RED.
Disclosed RED reasons