Repository navigation
Done
Description
Overview
Two pre-release fixes found by the R6 phase B sweep, both needed before the release that carries R6 phase A (PyAutoLabs/PyAutoGalaxy#759): JAX weak-lensing fits crash in visualization (#614), and FactorGraphModels mixing dataset types fail check_setup_agreement because each default-constructed factor resolves its own setup="auto".
Plan
- Weak (PyAutoLens): fix Weak-lensing visualization crashes on JAX path: fit.shear_yx lacks .grid #614 so a JAX
AnalysisWeakfit visualizes — the plotter receives a raw JAX array forshear_yx; build/convert the visualization fit with NumPy structures (as the imaging/interferometer visualizers do) rather than special-casing the plotter.AnalysisWeakkeepssetup="auto". - Factor graphs (PyAutoFit + PyAutoGalaxy): a factor whose setup was DEFAULTED (not passed) adopts one shared backend inside a
FactorGraphModel: if the defaulted factors' auto setups disagree, they fall back to the manual path on the graph's backend (FactorGraphModel(use_jax=...), or JAX when the graph does not say). Explicit setups are unchanged and must still agree. PyAutoFit gets a generic hook (no-op onaf.Analysis); PyAutoGalaxy'sAnalysisSetupMixinimplements it. - Tests: JAX weak fit + visualization; mixed imaging+interferometer and imaging+point graphs with default analyses pass
modify_before_fit; explicit disagreeing setups still raise. - Same branch
feature/likelihood-lifecycle-r6d-prerelease-fixesin Fit/Galaxy/Lens; merge Fit → Galaxy → Lens;pending-release.
Tier + merge mode: effective level: supervised; merge mode: human /prm
Original Prompt
Click to expand starting prompt
Likelihood lifecycle R6 pre-release fixes: JAX weak plotting (#614) and mixed factor graphs under setup="auto"
Type: feature
Target: PyAutoFit
Repos:
- PyAutoFit
- PyAutoGalaxy
- PyAutoLens
Themes: - hpc-gpu
Difficulty: medium
Autonomy: supervised
Priority: high
Status: draft
Consequence: judge
Witness: (1)al.AnalysisWeak(dataset)with the default setup fits and visualizes on the JAX path without theshear_yx.gridAttributeError; (2) aFactorGraphModelof a default-constructedal.AnalysisImagingandal.AnalysisInterferometer(or imaging + point) passesmodify_before_fit/check_setup_agreementwith nouse_jax=pins.
Epic: likelihood-lifecycle
Phase: 6 (R6 rollout, pre-release fixes)
Parent: draft/research/autolens_profiling/likelihood_lifecycle_epic.md
Filed: 2026-11-26
Human rulings (2026-11-26)
- Weak: "Fix Weak-lensing visualization crashes on JAX path: fit.shear_yx lacks .grid #614 first" — keep
setup="auto"forAnalysisWeak; make JAX weak fits visualize (Weak-lensing visualization crashes on JAX path: fit.shear_yx lacks .grid #614:autolens/weak/plot/weak_dataset_plots.py_positions_yxgets a raw JAX array forshear_yx). - Factor graphs: "Graph pushes backend down" — factors whose setup was DEFAULTED (not passed explicitly) inside a
FactorGraphModeladopt one shared backend so mixed graphs run without pins; explicit setups still must agree (check_setup_agreement, PyAutoFitautofit/graphical/declarative/collection.py).
Context
Found by the R6 phase B sweep (autolens_workspace#692, autogalaxy_workspace#285 pin use_jax in the affected examples). Must merge before the release that carries R6 phase A (PyAutoArray#715, PyAutoFit#1800, PyAutoGalaxy#760, PyAutoLens#894).
Metadata
Metadata
Assignees
Labels
No labels
Activity
Jammy2211 commentedon Nov 26, 2026
Shipped
Merged in order: PyAutoLabs/PyAutoFit#1801 (68075ce48; CI re-run once — Zeus conformance flake, not reproducible locally on 1 or 4 CPUs) → PyAutoLabs/PyAutoGalaxy#761 (5bdbfcbd0) → #896 (e318465). All
pending-release. JAX weak fits visualize (#614 closed); factors left on the default setup adopt one shared backend in aFactorGraphModel. The workspace pins added by the R6 phase B sweep (mixed graphsuse_jax=True, weakuse_jax=False) can come out after the release — follow-up draft filed.