Skip to content

feat: drop use_jax=True from analysis constructors; setup="auto" prose (R6 phase B) - #692

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/likelihood-lifecycle-r6b-use-jax-sweep
Nov 26, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/likelihood-lifecycle-r6b-use-jax-sweep

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Part of #691 (likelihood-lifecycle R6 phase B). Safe to merge before the next release: on 2026.11.25.1 an analysis without use_jax defaults to use_jax=True, so these scripts run exactly as before; from the next release they pick up setup="auto" (PyAutoLabs/PyAutoGalaxy#760, PyAutoLabs/PyAutoLens#894). No R6-only arguments are used. Prose is worded to be true on both releases.

  • Removes use_jax=True from 131 analysis constructors (AnalysisImaging, AnalysisInterferometer, AnalysisPoint, AnalysisWeak, the AnalysisLatent subclass in guides/results/_quick_fit.py), via an AST helper.
  • Keeps use_jax= on FactorGraphModel (19), apply_sparse_operator (13), PointSolver.for_grid (4), simulators, psf_precision_operator_from, and every use_jax=False.
  • Mixed-type factor graphs (multi_dataset/features/imaging_and_point_source/modeling.py, imaging_and_interferometer/modeling.py) pin use_jax=True on their analyses, with a note: under auto, imaging and point / interferometer factors resolve different setups and fail check_setup_agreement.
  • Weak lensing (weak/modeling.py, weak/likelihood_function.py, weak/real_data/a2744.py, weak/features/strong_lensing/modeling.py) pins use_jax=False: under auto AnalysisWeak picks JAX, and JAX weak plotting crashes (Weak-lensing visualization crashes on JAX path: fit.shear_yx lacks .grid PyAutoLens#614).
  • Prose in the start_here, fit and modeling scripts and guides (33 edits); notebooks regenerated for the 109 changed scripts only (llms-full.txt / workspace_index.json unchanged). markdown/ pages are rendered from executed runs and are left for the next render.
  • Excluded (other tasks): scripts/imaging/features/advanced/subhalo/sensitivity/slam_source_pixelized.py, scripts/cluster/plot.py.

Test Plan

  • imaging/start_here.py test mode: "Automatic compute setup … Setup: JAX · CPU · dense · fp64 (rule imaging/mge)"
  • Factor-graph scripts in test mode rc=0: multi_dataset modeling, wavelength_dependence, cluster modeling, point_source multiple_sources, graphical guide, datacube modeling/array_free/start_here, and the two mixed graphs after pinning
  • Heart smoke autolens against library main (R6): 45 PASS, 0 FAIL (weak/features/strong_lensing/a2744.py is SLOW-listed in config/build/no_run.yaml)

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

… setup="auto" (R6 phase B)

Part of #691.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit d4b3125 into main Nov 26, 2026
8 checks passed
@Jammy2211
Jammy2211 deleted the feature/likelihood-lifecycle-r6b-use-jax-sweep branch November 26, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant