Skip to content

feat: runtime_estimate hook after the Parallel banner (5E-2) - #1796

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/likelihood-lifecycle-p5e2-fit
Nov 24, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/likelihood-lifecycle-p5e2-fit

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Likelihood-lifecycle phase 5E-2, the second of three PRs under PyAutoLabs/PyAutoLens#887. It adds a small, duck-typed run-time estimate hook to PyAutoFit. After the fit's Parallel: banner, resolve_fit_parallel asks the analysis for a one-line estimate, logs it and records it in files/parallel.json. PyAutoLens implements the hook in 5E-3.

API Changes

  • runtime.resolve_fit_parallel(search, analysis, model=None): _fit_and_output now passes the model.
  • New runtime.runtime_estimate_line(search, analysis, model, number_of_cores): calls analysis.runtime_estimate(search=, model=, number_of_cores=) when defined and uses only a non-empty string. Exceptions are logged at debug level and ignored, so an estimate can never stop or change a fit.
  • files/parallel.json gains estimate_line (None when there is no estimate).
    See full details below.

Test Plan

  • pytest test_autofit: 4383 passed, 2 skipped, 1 xfailed. New: the hook is logged right after the banner and recorded; it receives the search, the model and the resolved core count; a raising hook is ignored; non-string and empty returns are ignored; no hook gives None. The existing parallel.json assertion is updated for the new key.
  • Heart dev gate (pyauto-heart readiness --dev --repos PyAutoFit): GREEN. Non-blocking shown reasons: manifest drift; test run status unknown; no release rehearsal for current source; release push credential check 53 h old.
  • pyauto-heart smoke --affected-by PyAutoFit --jobs 3: 8/8 workspaces PASS against this branch via PYAUTO_ROOT. The task root also held the in-progress 5E-3 PyAutoLens branch at the time, which passed too; 5E-3 gets its own smoke run.
Full API Changes (for automation & release notes)

Added

  • autofit.non_linear.search.runtime.runtime_estimate_line(search, analysis, model, number_of_cores).
  • Duck-typed analysis hook runtime_estimate(search, model, number_of_cores) -> Optional[str].
  • estimate_line key in files/parallel.json.

Changed

  • resolve_fit_parallel(search, analysis, model=None) takes the model (optional, so existing callers still work).

Migration

  • None.

Notes:

  • abstract_search.py stays at 599 lines (one-line call-site change).

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

resolve_fit_parallel takes the model and, after the Parallel: banner, asks
a duck-typed analysis.runtime_estimate(search, model, number_of_cores) for
a one-line estimate, logging it and recording estimate_line in
files/parallel.json. A missing, raising or empty hook never affects a fit.

Part of PyAutoLabs/PyAutoLens#887 (likelihood-lifecycle phase 5E-2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Nov 24, 2026
@Jammy2211
Jammy2211 merged commit dbdf4f9 into main Nov 24, 2026
6 checks passed
@Jammy2211
Jammy2211 deleted the feature/likelihood-lifecycle-p5e2-fit branch November 24, 2026 21:55
@pyautolabs-bot pyautolabs-bot Bot removed the pending-release PR queued for the next release build label Nov 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.

1 participant