Skip to content

fix: restore BFGS and LBFGS checkpoint resume - #1731

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/bfgs-checkpoint-resume
Oct 25, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/bfgs-checkpoint-resume

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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
  • install verification FAILED (testpypi; checks F)
  • release validation FAILED (stage integrate)
  • PyAutoHeart/workflows/Release Integrate: failure
  • manifest_drift/checks/workspace checkouts (manifest ↔ disk): red
  • Release readiness: release validation FAILED (stage integrate)
  • Release readiness: install verification FAILED (testpypi; checks F)
  • PyAutoArray/test_autoarray/inversion/inversion/interferometer/test_interferometer.py::test__interferometer_sparse_operator__mapped_reconstructed_data_dict_matc…
  • Unit-test timing: 1 test regressions (>3× baseline), 11 slow (>1.5×)
  • Release validation: NOT release_ready — v2026.10.25.1.dev83701 profile=release (2026-10-25T07:21:05+00:00)
  • validation_report/stages/integrate: fail
  • verify_install FAILED: verify_install FAILED
  • F: colab gate: finufft (declared by autoarray, absent on Colab, imported)
  • Install verification: FAILED (testpypi; F) (2026-10-25T07:42:48.134987+00:00)
  • verify_install: red
  • PyAutoBrain: red
  • PyAutoLens: red
  • autolens_profiling: red
  • Worktree drift: 1 orphan / 0 missing / 3 dirty

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Oct 25, 2026 — with ChatGPT Codex Connector
@Jammy2211
Jammy2211 merged commit be4d8bb into main Oct 25, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/bfgs-checkpoint-resume branch October 25, 2026 15:24
@pyautolabs-bot pyautolabs-bot Bot removed the pending-release PR queued for the next release build label Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: restore BFGS and LBFGS checkpoint resume

1 participant