Repository navigation
feat: runtime_estimate hook after the Parallel banner (5E-2) - #1796
Merged
Merged
Conversation
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>
This was referenced Nov 24, 2026
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.
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_parallelasks the analysis for a one-line estimate, logs it and records it infiles/parallel.json. PyAutoLens implements the hook in 5E-3.API Changes
runtime.resolve_fit_parallel(search, analysis, model=None):_fit_and_outputnow passes the model.runtime.runtime_estimate_line(search, analysis, model, number_of_cores): callsanalysis.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.jsongainsestimate_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 existingparallel.jsonassertion is updated for the new key.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).runtime_estimate(search, model, number_of_cores) -> Optional[str].estimate_linekey infiles/parallel.json.Changed
resolve_fit_parallel(search, analysis, model=None)takes the model (optional, so existing callers still work).Migration
Notes:
abstract_search.pystays at 599 lines (one-line call-site change).Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code