Skip to content

feat: lens analyses default to setup="auto"; explicit use_jax opts out (R6) - #894

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/likelihood-lifecycle-r6-default-auto
Nov 26, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/likelihood-lifecycle-r6-default-auto

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Part of PyAutoLabs/PyAutoGalaxy#759 (likelihood-lifecycle ruling R6: flip the defaults after the 2026.11.25.1 opt-in release). Same branch feature/likelihood-lifecycle-r6-default-auto in PyAutoArray, PyAutoFit, PyAutoGalaxy, PyAutoLens and autolens_workspace_test. Merge order: Array → Fit → Galaxy → Lens → autolens_workspace_test.

  • setup="auto" is the default for al.AnalysisImaging, al.AnalysisInterferometer, al.AnalysisPoint and al.AnalysisWeak, with the PyAutoGalaxy precedence: setup passed → as given (None = opt-out); else explicit use_jax → manual opt-out; else auto. use_jax defaults to None; each class keeps its old backend for the opt-out path (AnalysisWeak stays NumPy).
  • raise_if_setup_unresolved no longer raises for the defaulted setup: a default-constructed analysis evaluated before a fit (e.g. analysis.log_likelihood_function(instance) in a script) runs with the constructor backend, as before the flip. An explicitly passed setup that was never resolved still raises.
  • Tests pin lazy_sparse_operator="off" where they compare against a dense reference.

API Changes

al.AnalysisImaging/Interferometer/Point/Weak: use_jax: Optional[bool] = None, setup defaults to "auto"; explicit use_jax with no setup opts out.
See full details below.

Test Plan

  • Full suites with JAX (serial): PyAutoArray 2614, PyAutoFit 4391, PyAutoGalaxy 1679, PyAutoLens 1177 passed
  • No-JAX leg reproduced exactly as CI (venv with the [optional] extras, jax family uninstalled): PyAutoArray 2149, PyAutoFit 4064, PyAutoGalaxy 1595, PyAutoLens 1112 passed, 0 failed
  • pyauto-heart smoke --affected-by PyAutoFit against the task worktree: 7/8 workspaces; the one failing script (autolens_workspace_test jax_assertions/fit_interferometer_sparse_operator.py) encodes the old lazy-off default and is fixed by the companion autolens_workspace_test PR (passes against this branch)
  • New tests: defaults per analysis, opt-out, AnalysisWeak opt-out stays NumPy, two pixelized sources lazy == dense, aggregator with no setup
  • Heart dev-ship readiness: GREEN (after a fresh tick). Shown, non-blocking: canonical PyAutoFit/PyAutoGalaxy/PyAutoLens checkouts 2 commits behind origin (release Colab-URL bumps; the task branches are rebased on them); manifest drift (1 mismatch).
Full API Changes (for automation & release notes)

Changed

  • al.AnalysisImaging(dataset, use_jax=None, setup="auto", ...); AnalysisInterferometer, AnalysisPoint, AnalysisWeak likewise.
  • raise_if_setup_unresolved skips analyses whose setup was defaulted.

Migration

  • Keep manual control: al.AnalysisImaging(dataset=dataset, use_jax=True) (or setup=None).

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

…t (R6)

Part of PyAutoLabs/PyAutoGalaxy#759.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant