Skip to content

feat: R6 default flip to setup="auto" and number_of_cores="auto" (likelihood lifecycle) #759

Done

Description

@Jammy2211

Overview

Likelihood-lifecycle ruling R6: release 2026.11.25.1 shipped setup="auto" as opt-in with a "would choose" banner; this task flips the defaults. Phase A (this issue's library PRs) makes setup="auto" the default for the dataset analyses, number_of_cores="auto" the default for searches, turns on the lazy sparse operator and slims the numpy operator attach. Phase B sweeps use_jax= out of the workspaces after the phase A release.

Plan

  • Analyses (PyAutoGalaxy, PyAutoLens): imaging, interferometer, point and weak analyses default to use_jax=None, setup="auto". An explicit use_jax=True/False with no setup opts out of auto (today's manual behaviour + "would choose" banner).
  • Operator attach (PyAutoGalaxy): AnalysisDataset's numpy operator attach delegates to PyAutoArray sparse_operator_for (no behaviour change).
  • Searches (PyAutoFit): number_of_cores defaults to "auto" across searches, grid search and settings. Risk to check: plain PyAutoFit analyses with no resources_per_eval get all detected cores.
  • Lazy operator (PyAutoArray): general.yaml lazy_sparse_operator → "auto".
  • Phase B (later, after the phase A release): six workspace repos drop use_jax=True; deliberate use_jax=False stays as the opt-out or becomes an explicit setup=.
  • Tests per change; four suites green; pyauto-heart smoke --affected-by PyAutoFit.

Tier + merge mode: effective level: supervised; merge mode: human /prm

Detailed implementation plan

Affected Repositories

  • PyAutoGalaxy (primary)
  • PyAutoArray
  • PyAutoFit
  • PyAutoLens
  • Phase B: autolens_workspace, autogalaxy_workspace, HowToLens, HowToGalaxy, autolens_workspace_test, autogalaxy_workspace_test

Branch Survey

Repository Current Branch Dirty?
./PyAutoArray main clean
./PyAutoFit main clean
./PyAutoGalaxy main clean
./PyAutoLens main clean

Suggested branch: feature/likelihood-lifecycle-r6-default-auto (same name in all four; merge Array → Fit → Galaxy → Lens)

Note: PyAutoLens is claimed by cluster-family-fit-figures (awaiting-merge, different branch/files); human-approved overlap.

Implementation Steps

  1. PyAutoArray autoarray/config/general.yaml: lazy_sparse_operator: "auto"; update the comment and any tests asserting the old default.
  2. PyAutoFit search defaults (abstract_search.py, abstract_nest.py, abstract_mcmc.py, nautilus, dynesty static/dynamic/abstract, emcee, zeus, nss, blackjax nuts/smc, _template, grid/grid_search, settings.py): number_of_cores="auto"; check every path accepts the string (5D resolve_number_of_cores); update docstrings/tests. Measure autofit_workspace smoke impact of the all-cores resolution for analyses without resources_per_eval.
  3. PyAutoGalaxy analysis/analysis/dataset.py, imaging/model/analysis.py, interferometer/model/analysis.py (and base analysis/analysis/analysis.py if it carries the default): use_jax: Optional[bool] = None, setup="auto"; rule: setup given → resolve it; else use_jax given → manual (setup None, would-choose banner); else auto. Slim the numpy operator attach to sparse_operator_for.
  4. PyAutoLens analysis/analysis/dataset.py, analysis/analysis/lens.py, imaging/model/analysis.py, interferometer/model/analysis.py, point/model/analysis.py, weak/model/analysis.py: same defaults and rule.
  5. Tests for the default, the opt-out and the cores default; run all four suites and Heart smoke.

Key Files

  • PyAutoGalaxy/autogalaxy/analysis/analysis/dataset.py, .../setup.py, .../setup_util.py
  • PyAutoLens/autolens/*/model/analysis.py, autolens/analysis/analysis/{dataset,lens,setup}.py
  • PyAutoFit/autofit/non_linear/search/**, parallel/pool.py
  • PyAutoArray/autoarray/config/general.yaml

Original Prompt

Click to expand starting prompt

Likelihood lifecycle R6: flip the default to setup="auto", then sweep use_jax= out of the workspaces

Type: feature
Target: PyAutoGalaxy
Repos:

  • PyAutoGalaxy
  • PyAutoLens
  • PyAutoArray
  • PyAutoFit
  • autolens_workspace
  • autogalaxy_workspace
  • HowToLens
  • HowToGalaxy
  • autolens_workspace_test
  • autogalaxy_workspace_test
    Themes:
  • hpc-gpu
    Difficulty: large
    Autonomy: supervised
    Priority: high
    Status: draft
    Consequence: judge
    Witness: A fresh al.AnalysisImaging(dataset=dataset) with no setup= and no use_jax= resolves setup="auto" at fit start (banner shows "Automatic compute setup"), and the workspace start_here scripts carry no use_jax= argument.
    Epic: likelihood-lifecycle
    Phase: 6 (R6 rollout)
    Parent: draft/research/autolens_profiling/likelihood_lifecycle_epic.md
    Filed: 2026-11-25

Request (human, 2026-11-25, verbatim)

"Do those and go to next epic step" — the next epic step being the R6 default flip + use_jax sweep, after release 2026.11.25.1 shipped setup="auto" opt-in with the "would choose" banner.

Context

  • Ruling R6 (2026-11-16): one release with setup="auto" opt-in and a "would choose" banner (done: 2026.11.25.1), then the default flips.
  • Today the dataset analyses default to use_jax=True, setup=None; use_jax is honoured only when setup is None, a resolved setup sets the backend.
  • Follow-ups recorded for the flip: slim the numpy operator attach in AnalysisDataset so it delegates to PyAutoArray sparse_operator_for; decide lazy_sparse_operator default (off this release) and number_of_cores default (1).
  • Workspace scripts pass use_jax= in ~355 files (autolens_workspace 170, autogalaxy_workspace 52, HowToLens 4, HowToGalaxy 13, autolens_workspace_test 74, autogalaxy_workspace_test 42).

Out of scope

  • New profiling or rule changes (setup_rules.yaml).
  • autolens_assistant docs (separate follow-up draft/feature/autolens_assistant/hpc_setup_flag_and_wiki_auto_setup.md).

Activity

  1. Jammy2211 commented on Nov 26, 2026

    @Jammy2211
    CollaboratorAuthor

    Library PRs created (phase A)

    Merge in order: PyAutoLabs/PyAutoArray#715 → PyAutoLabs/PyAutoFit#1800 → #760 → PyAutoLabs/PyAutoLens#894 → PyAutoLabs/autolens_workspace_test#373. Library PRs labelled pending-release.

    Rulings 2026-11-26: GridSearch keeps number_of_cores=1 (bug draft filed); the smoke-script fix ships as autolens_workspace_test#373; the numba multi-mapper data_vector fix ships inside PyAutoArray#715.

    Suites green with JAX and on a CI-faithful no-JAX venv; Heart readiness GREEN; Heart smoke 7/8 (the 8th is the script #373 fixes). Phase B (workspace use_jax= sweep) after the release carrying these.

  2. Jammy2211 commented on Nov 26, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped (phase A)

    Merged in order: PyAutoLabs/PyAutoArray#715 (e261e6d6f) → PyAutoLabs/PyAutoFit#1800 (67164d229) → #760 (9c39163) → PyAutoLabs/PyAutoLens#894 (cf591d0e0) → PyAutoLabs/autolens_workspace_test#373 (6a2e17dc0). Library PRs are pending-release.

    Defaults now on library main: setup="auto" for the dataset analyses (explicit use_jax opts out), number_of_cores="auto" for searches (GridSearch stays 1), lazy_sparse_operator: "auto".

    Phase B (workspace use_jax= sweep) is re-filed as its own Mind draft and runs after the release carrying these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions