Repository navigation
feat: estimate_runtime setup/cores auto, no-cell estimate, reworded setup guard - #892
Merged
Merged
Conversation
…back estimates Part of PyAutoLabs/PyAutoGalaxy#756. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests
The no-JAX CI leg has no JAX, so every JAX setup hit the numpy-fallback path and
was not priced by the JAX rows. Pin find_spec('jax') in the module and add an
explicit JAX-not-installed fallback test.
Part of PyAutoLabs/PyAutoGalaxy#756.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Part of PyAutoLabs/PyAutoGalaxy#756 (likelihood-lifecycle pre-release setup fixes). Merge order: PyAutoFit → PyAutoGalaxy → PyAutoLens (same branch name in all three).
al.estimate_runtimeacceptssetup="auto"andnumber_of_cores="auto". The setup resolves viaaa.Setup.autowith the same rule key the analyses use (PYAUTO_SETUPhonoured); the cores resolve via PyAutoFit'sresolve_number_of_cores(1 for JAX, else detected cores capped by the matched row's resources).None.line()readsEstimate: no estimate for <setup_id> (no profiling cell). The fit-timeEstimate:line stays silent in that case, as before.PYAUTO_DISABLE_JAX=1/ JAX not installed) returnsEstimate: no estimate for <setup_id> (designated JAX; JAX disabled, the numpy fallback has no profiling cell)and is silent at fit time; its explicitnumber_of_coresis kept andresources_per_eval()returnsNone, so the JAX rows no longer cap the numpy fit's"auto"cores.SetupExceptionnow says the likelihood was evaluated before the setup resolved (at fit start, or on pre-fit calls given a model) and points toanalysis.prepare_for_model(model); the stale "not supported inside factor graphs / planned 5D" text is removed from the message and docstrings.API Changes
estimate_runtimegainssetup="auto",number_of_cores="auto"and a no-cell estimate; newresolve_setup_from;RuntimeEstimategainshas_profiling_cell,fallback_reasonandRuntimeEstimate.no_profiling_cell(...).See full details below.
Test Plan
test_autolensfull suite passes (1169 passed, 1 xfailed)test_runtime_estimate.py: auto setup matches the analysis,PYAUTO_SETUPoverride, point dataset needslikelihood=, auto cores (JAX → 1; numba matchesresolve_number_of_cores), no-cell line, fit-time silence, JAX-disabled fallbackFull API Changes (for automation & release notes)
Added
al.estimate_runtime(..., setup="auto", number_of_cores="auto").autolens.analysis.runtime_estimate.resolve_setup_from(dataset, model, setup, likelihood=None).RuntimeEstimate.no_profiling_cell(setup_id, backend, number_of_cores, search=None, fallback_reason=None); fieldshas_profiling_cell,fallback_reason.Changed
estimate_runtimereturns a no-cell estimate instead ofNonewhen the setup has no profiling row (setup=Nonestill returnsNone).SETUP_UNRESOLVED_MESSAGE/exc.SetupExceptionwording.Migration
al.estimate_runtime(dataset, model, search, setup="numba_cpu_sparse_fp64", number_of_cores=16)al.estimate_runtime(dataset, model, search, setup="auto", number_of_cores="auto")Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code