You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Author the missing quantity/modeling_visualization_jit.py JIT-cached integration script in autogalaxy_workspace_test. The repo currently has quantity/visualization_jax.py (single-shot, no Nautilus) but lacks the JIT-cached + live-Nautilus variant that exists for every other dataset type. Mirrors the structure of the imaging variant shipped in PR #54.
Phase D.2.b.i of z_features/fast_visualization.md. Phase D.2.b.ii (ellipse) and D.2.b.iii (weak lensing) are separate follow-ups; this PR is scoped to one new file in one repo so the pattern can be validated before authoring the more divergent dataset types.
Plan
New file autogalaxy_workspace_test/scripts/quantity/modeling_visualization_jit.py mirroring the structure of autogalaxy_workspace_test/scripts/imaging/modeling_visualization_jit.py (Part-1 caching probe + non-lensing __Visualization Sanity__ block + Part-2 live Nautilus quick-update).
Dataset / mask / model_mge reused from quantity/visualization_jax.py. Swap ag.AnalysisImaging → ag.AnalysisQuantity; everything else stays the same shape.
Non-lensing Sanity template from Phase D.1: fit.model_data finite + non-zero, fit.figure_of_merit finite (confirmed FitQuantity.model_data API at autogalaxy/quantity/fit_quantity.py:71-72).
No library changes, no edits to existing visualization_jax.py, no new dataset coverage outside quantity.
Read source for dataset/modelautogalaxy_workspace_test/scripts/quantity/visualization_jax.py — copy the dataset path, mask construction, and model_mge composition. Swap ag.AnalysisImaging → ag.AnalysisQuantity (existing in viz_jax already — no API change needed).
Part 2: live Nautilus quick-update on a small model_mge with iterations_per_quick_update, assert fit.png lands in the configured output path.
Local validation — python scripts/quantity/modeling_visualization_jit.py (no PYAUTO_TEST_MODE). Confirm Part 1 + Sanity + Part 2 pass end-to-end and the printed |model_data|.sum() / FoM are sensible.
Key Files
autogalaxy_workspace_test/scripts/quantity/modeling_visualization_jit.py — new file (1 script).
API references:FitQuantity.model_data confirmed at autogalaxy/quantity/fit_quantity.py:71-72 (live API as of 2026-05-21). ag.AnalysisQuantity already used in the sibling visualization_jax.py script.
Overview
Author the missing
quantity/modeling_visualization_jit.pyJIT-cached integration script inautogalaxy_workspace_test. The repo currently hasquantity/visualization_jax.py(single-shot, no Nautilus) but lacks the JIT-cached + live-Nautilus variant that exists for every other dataset type. Mirrors the structure of the imaging variant shipped in PR #54.Phase D.2.b.i of
z_features/fast_visualization.md. Phase D.2.b.ii (ellipse) and D.2.b.iii (weak lensing) are separate follow-ups; this PR is scoped to one new file in one repo so the pattern can be validated before authoring the more divergent dataset types.Plan
autogalaxy_workspace_test/scripts/quantity/modeling_visualization_jit.pymirroring the structure ofautogalaxy_workspace_test/scripts/imaging/modeling_visualization_jit.py(Part-1 caching probe + non-lensing__Visualization Sanity__block + Part-2 live Nautilus quick-update).model_mgereused fromquantity/visualization_jax.py. Swapag.AnalysisImaging→ag.AnalysisQuantity; everything else stays the same shape.fit.model_datafinite + non-zero,fit.figure_of_meritfinite (confirmedFitQuantity.model_dataAPI atautogalaxy/quantity/fit_quantity.py:71-72).visualization_jax.py, no new dataset coverage outside quantity.Detailed implementation plan
Affected Repositories
Work Classification
Workspace.
Branch Survey
Suggested branch:
feature/quantity-modeling-viz-jitWorktree root:
~/Code/PyAutoLabs-wt/quantity-modeling-viz-jit/(created later by/start_workspace)Implementation Steps
autogalaxy_workspace_test/scripts/imaging/modeling_visualization_jit.py— that's the Part-1 / Sanity / Part-2 skeleton.autogalaxy_workspace_test/scripts/quantity/visualization_jax.py— copy the dataset path, mask construction, andmodel_mgecomposition. Swapag.AnalysisImaging→ag.AnalysisQuantity(existing in viz_jax already — no API change needed).autogalaxy_workspace_test/scripts/quantity/modeling_visualization_jit.py:cached_time < compile_time * 0.5andanalysis_mge._jitted_fit_from is not None.__Visualization Sanity__block: non-lensing template from PR test(viz): __Visualization Sanity__ rollout across modeling_visualization_jit*.py #54 —fit_2.model_datafinite/non-zero,fit_2.figure_of_meritfinite.model_mgewithiterations_per_quick_update, assertfit.pnglands in the configured output path.python scripts/quantity/modeling_visualization_jit.py(no PYAUTO_TEST_MODE). Confirm Part 1 + Sanity + Part 2 pass end-to-end and the printed|model_data|.sum()/ FoM are sensible.Key Files
autogalaxy_workspace_test/scripts/quantity/modeling_visualization_jit.py— new file (1 script).Out of scope (Phase D.2.b.ii / D.2.b.iii)
autogalaxy_workspace_test/scripts/ellipse/modeling_visualization_jit.py+visualization_jax.py(both missing — D.2.b.ii).autolens_workspace_test/scripts/weak/(entire directory missing — D.2.b.iii).Original Prompt
Click to expand starting prompt
See
PyAutoPrompt/issued/quantity_modeling_visualization_jit.mdfor the verbatim authored prompt. Key reference points kept inline:autogalaxy_workspace_test/scripts/imaging/modeling_visualization_jit.py(PR test(viz): __Visualization Sanity__ rollout across modeling_visualization_jit*.py #54). Same Part-1 / Sanity / Part-2 structure; only dataset / model / analysis swap.FitQuantity.model_dataconfirmed atautogalaxy/quantity/fit_quantity.py:71-72(live API as of 2026-05-21).ag.AnalysisQuantityalready used in the siblingvisualization_jax.pyscript.np.asarray(fit.model_data), finite/non-zero + finite FoM.