Repository navigation
Description
Overview
A follow-up to likelihood-lifecycle phase 5 (5A–5E merged). It makes the automatic compute-setup choice visible and concise. A fit prints one header line saying this is the automatic CPU/GPU setup choice, then the aligned Setup / Parallel / Estimate lines together, with no contradicting line before them. When the setup acts outside modeling (a lazy sparse-operator build, or an aggregator reload reapplying setup.json), a one-line notice says so. Format approved by the human on 2026-11-25.
Plan
-
PyAutoFit:
log_fit_startdrops the pre-setup "with JAX (…)" claim. TheParallel:line reports the device for JAX ("1 worker (JAX on GPU: A100…)") and uses the concise wording. -
PyAutoGalaxy: the setup resolution logs the header (auto / explicit / PYAUTO_SETUP wording) and the concise
Setup:line, with the extrapolated reason. No setup gives the single "not set (auto would choose …)" line. The aggregator reapply logs a one-line notice. -
PyAutoLens:
RuntimeEstimate.line()puts the wall time first in the conciseEstimate:format. -
PyAutoArray: the lazy sparse-operator build logs
Automatic compute setup: built the … operator for this dataset (…; cached; lazy_sparse_operator: auto). -
Lines are logged consecutively with aligned labels. All four repos use the same branch name (
feature/auto-setup-banner) so each repo's CI tests them together. -
Tier + merge mode: effective level: supervised; merge mode: human /prm (per PR; merge order Array → Fit → Galaxy → Lens)
Detailed implementation plan
Affected Repositories
- PyAutoGalaxy (primary, issue home)
- PyAutoArray, PyAutoFit, PyAutoLens
Branch Survey
All four are on main and clean.
Branch (same name in all four): feature/auto-setup-banner, worktree ~/Code/PyAutoLabs-wt/auto-setup-banner.
Implementation Steps
- PyAutoFit:
autofit/non_linear/search/runtime.pylog_fit_start: remove the JAX device claim and keep the quick-update line.autofit/non_linear/parallel/pool.pyParallelResolution.banner:Parallel: N workers (auto: detected cores)/(requested N)/1 worker (JAX on CPU|GPU: <name>)/(auto: capped by memory: …). The device comes from the analysis / JAX only if JAX is already imported.- Update the tests that assert banner text.
- PyAutoGalaxy:
autogalaxy/analysis/setup_util.pysetup_banner_from→ returns the header plus theSetup:line, logged as two consecutive records or one multi-line record (choose the one that renders cleanly with the workspace logging format, and say which).- Readable tokens: backend name, CPU/GPU, "sparse operator" / "dense" / "no operator", the precision, and the transformer when present.
- The rule shown as
<dataset_type>/<variant>. - The extrapolated reason from the hardware class and
MANY_CORE_MIN_CORES(non-A100 GPU / fewer cores than a many-core node). _log_setup_auto_would_choose→ the single "not set" line.agg_util.dataset_with_setup_from→ an INFO notice on a successful reapply.- Tests.
- PyAutoLens:
autolens/analysis/runtime_estimate.pyRuntimeEstimate.line()puts~<wall> on this hardwarefirst, with the details in parentheses. Keep the band, uncalibrated and non-Nautilus variants concise. Update the tests. - PyAutoArray:
Imaging.sparse_operator_for/Interferometer.sparse_operator_forbuild log → the "Automatic compute setup: built …" notice. Tests. - Demo check: the orchestrator reruns the test-mode workspace fit and pastes the terminal output into the PR bodies.
- Each repo's full suite;
pyauto-heart smoke --affected-byfor each repo.
Key Files
autofit/non_linear/search/runtime.py,autofit/non_linear/parallel/pool.pyautogalaxy/analysis/setup_util.py,autogalaxy/analysis/analysis/setup.py,autogalaxy/aggregator/agg_util.pyautolens/analysis/runtime_estimate.pyautoarray/dataset/imaging/dataset.py,autoarray/dataset/interferometer/dataset.py,autoarray/dataset/lazy_operator.py
Original Prompt
Click to expand starting prompt
Likelihood lifecycle phase 5 follow-up: a concise automatic compute-setup banner at fit start, and notices when the setup acts outside modeling
Type: feature
Target: PyAutoGalaxy
Repos:
- PyAutoArray
- PyAutoFit
- PyAutoGalaxy
- PyAutoLens
Themes: - hpc-gpu
- profiling
Difficulty: medium
Autonomy: supervised
Priority: high
Status: draft
Consequence: judge
Witness: A test-modeal.AnalysisImaging(dataset, setup="auto")+af.Nautilus(number_of_cores="auto")fit prints, with no contradicting line before it, one header line stating that this is the automatic CPU/GPU compute-setup choice, followed together by the alignedSetup:,Parallel:andEstimate:lines in the approved concise format. The stale "Starting non-linear search with JAX (CPU: cpu)." claim is gone, and the device is reported inParallel:once known. Explicit andPYAUTO_SETUPsetups get their own header wording; no setup gives one "not set (auto would choose …)" line. Outside modeling, a lazy sparse-operator build (lazy_sparse_operator: auto) and an aggregator reload that reappliessetup.jsoneach print one concise notice in the same "compute setup" voice. All four suites are green, and smoke passes.
Review-minutes: 20
Unattended: no
Lane: any
Gate: 5A–5E MERGED. Human approved the format on 2026-11-25 ("pretty much good, but maybe also have a header … and make sure such a message appears outside of modeling too so a user knows it happened"). Ships before 5F, so the 5Fguides/advanced/auto_setup.pyguide shows the final output.
Epic: likelihood-lifecycle
Phase: 5
Parent: draft/research/autolens_profiling/likelihood_lifecycle_epic.md
Filed: 2026-11-25
Context
-
Observed 2026-11-25 (a test-mode run from autolens_workspace):
- PyAutoFit
log_fit_startprints "Starting non-linear search with JAX (CPU: cpu)." beforemodify_before_fit; the setup then picked numba. - The Galaxy Setup line reads
numba/cpu/sparse/fp64 (8 CPU cores) · rule imaging-rectangular-standard-cpu-many-core · extrapolated (decision imaging-rectangular-standard-cpu-many-core) · override: PYAUTO_SETUP, with the id repeated and no reason for "extrapolated". - Setup, Parallel and Estimate are split by warnings and other log lines.
- PyAutoFit
-
Approved target format (the timestamp/module prefix comes from the workspace
logging.yamland is unchanged). The label column is aligned and the lines are logged consecutively:Automatic compute setup (CPU/GPU choice from setup="auto"; override with PYAUTO_SETUP or setup=...): Setup: numba · CPU · sparse operator · fp64 (rule imaging/rectangular · extrapolated: 8 cores, rules measured on ≥16-core nodes) Parallel: 8 workers (auto: detected cores) Estimate: ~6.4 min on this hardware (283 ms/eval, euclid cell · Nautilus n_live=50 ≈ 4.6e3 evals, heuristic · η=0.55)- Explicit setup: header
Compute setup (set explicitly by setup=...):. PYAUTO_SETUP:Compute setup (set by PYAUTO_SETUP=<id>):. - No setup: one line,
Compute setup: not set (auto would choose numba · CPU · sparse operator · fp64; pass setup="auto"). - JAX:
Parallel: 1 worker (JAX on CPU)/(JAX on GPU: <name>).
- Explicit setup: header
-
Outside modeling:
- Array lazy build:
Automatic compute setup: built the numba sparse operator for this dataset (256 image pixels, 0.12 s; cached; lazy_sparse_operator: auto), or the interferometer w-tilde equivalent with visibilities and "chunked". - Galaxy aggregator reapply:
Compute setup: reapplied numba_cpu_sparse_fp64 from the search's setup.json. apply_setupitself stays silent, so modeling doesn't print twice.
- Array lazy build:
Out of scope
- The global log format (workspace
logging.yaml). - The 5F workspace guide and prose.
- The default flip (R6).
Activity
Jammy2211 commentedon Nov 25, 2026
Claim note: PyAutoLens is still registered in Mind to
cluster-family-fit-figures, but that task's PR (PyAutoLabs/PyAutoLens#884) is merged and touched only cluster/point plotting. The human approved overriding the stale claim (2026-11-25). This task's PyAutoLens change is limited toautolens/analysis/runtime_estimate.py(the Estimate line) and its tests.Jammy2211 commentedon Nov 25, 2026
Shipped as five PRs on
feature/auto-setup-banner(merge in this order): PyAutoLabs/PyAutoNerves#224 → PyAutoLabs/PyAutoArray#713 → PyAutoLabs/PyAutoFit#1797 → #755 → PyAutoLabs/PyAutoLens#889. The Nerves PR fixes GPU detection underJAX_PLATFORMS=cpu, which the demo exposed. Gate: all suites green, Heart GREEN, smoke 8/8.Jammy2211 commentedon Nov 25, 2026
Shipped
Merged in order (all pending release):
JAX_PLATFORMSwithout GPU platforms.Parallel:line with device; no pre-setup JAX claim.Setup:line, not-set line, aggregator reapply notice.Estimate:line.Next: 5F (workspace prose, including
guides/advanced/auto_setup.py).