Overview
The PyAutoLens-JAX paper draft (PyAutoLens/paper_jax/paper.md) promises 10 end-to-end benchmarks (6 single-dataset, 4 joint) that do not yet exist. This task creates a new public repo PyAutoLabs/autolens_jax_joss containing one runnable script per benchmark plus a timing/report harness, and pairs each benchmark to a real-data start_here.py (or multi feature script) in autolens_workspace — upgrading the simulated ones to real data. Because these land in start_here.py, they are user-facing far beyond the paper: each rewrite keeps teaching-quality prose, runs on a normal laptop, and auto-downloads its data.
Per the paper, every benchmark reports: total wall-clock, JAX compile time, number of likelihood evaluations, post-compile runtime (+ hardware/versions). Official numbers on an NVIDIA A100; scripts reproducible on any GPU/CPU.
Dataset decisions (user-approved): ALMA = SDP.81 · point source = RXJ1131-1231 · cluster + weak + joint strong/weak anchor = Abell 2744 · repo = PyAutoLabs org, public.
Plan
Benchmark ↔ workspace pairing table
| Benchmark |
Paired example |
Data |
| Galaxy-scale imaging |
scripts/imaging/start_here.py |
cosmos_web_ring (real, JWST F150W) |
| Interferometry |
scripts/interferometer/start_here.py |
SDP.81 (ALMA, >1M vis) |
| Point source |
scripts/point_source/start_here.py |
RXJ1131-1231 (positions + delays) |
| Group |
scripts/group/start_here.py |
existing real group lens (verify) |
| Cluster |
scripts/cluster/start_here.py |
Abell 2744 (multiple images) |
| Weak |
scripts/weak/start_here.py (new) |
Abell 2744 JWST shape catalogue |
| Multi-band |
scripts/multi/start_here.py |
cosmos_web_ring 4 wavebands |
| Strong + weak |
scripts/weak/features/strong_lensing/ |
Abell 2744 |
| Imaging + point source |
scripts/multi/features/imaging_and_point_source/ (new) |
RXJ1131-1231 |
| Imaging + interferometer |
scripts/multi/features/imaging_and_interferometer/ |
SDP.81 |
Detailed implementation plan
Affected Repositories
- autolens_jax_joss (new, primary deliverable)
- autolens_workspace (primary tracked repo)
Branch Survey
| Repository |
Current Branch |
Dirty? |
| ./autolens_workspace |
main |
clean |
Suggested branch: feature/jax-joss-benchmarks
Worktree: ~/Code/PyAutoLabs-wt/jax-joss-benchmarks/
Data hosting policy
Large real datasets are never committed: sizeable data (SDP.81 visibilities, A2744 catalogues/imaging, RXJ1131 cutouts) is fetched automatically on first run from a stable public URL (Zenodo preferred; weak/real_data/a2744.py download-and-cache pattern is the template) into gitignored dataset/ paths, with checksum + printed provenance. Small derived products (position/delay JSONs, model CSVs, kB–few-MB) may live in dataset/ per existing convention.
Implementation Steps
gh repo create PyAutoLabs/autolens_jax_joss --public; skeleton: README (pairing table + how to run), LICENSE, .gitignore, requirements.txt, benchmarks/, results/.
harness.py: runner recording wall-clock, compile time (first-eval − steady-state), likelihood evals (search counter), post-compile runtime, GPU/CPU + jax/autolens versions → results/<benchmark>.json; regenerates RESULTS.md.
benchmarks/imaging.py + benchmarks/multi_band.py — same data/model family as their paired start_here scripts (MGE lens light + SIE+shear + pixelized source, gradient-based search), tuned toward ~5 min on A100.
- Phases 2–5 per the checklist above: each = real-data acquisition (download-on-first-run) + start_here rewrite (teaching prose, laptop-runnable) + JOSS benchmark script(s).
- A100 timing runs via the RAL HPC pipeline; commit
results/*.json + regenerated RESULTS.md.
Key Files
autolens_jax_joss/harness.py — timing/report harness (new)
autolens_jax_joss/benchmarks/*.py — the 10 benchmarks (new)
autolens_workspace/scripts/{interferometer,point_source,cluster}/start_here.py — real-data rewrites
autolens_workspace/scripts/weak/start_here.py — new front door for weak lensing
autolens_workspace/scripts/multi/features/imaging_and_point_source/ — new joint feature script
PyAutoLens/paper_jax/paper.md — benchmark section these numbers feed (not edited here)
Risks
- ~5 min A100 targets are aspirational until measured — report honestly, tune (e.g.
lax.map batch_size) rather than fake.
- SDP.81 visibility extraction may need CASA; fallback = pre-exported uv table on Zenodo.
- Cluster/group JAX point-solver performance at scale less battle-tested than imaging.
Original Prompt
Click to expand starting prompt
Create a repo autolens_jax_joss which provides examples to run each JAX benchmark from the PyAutoLens-JAX paper draft and reports the run time and info. These benchmarks currently do not exist.
Single-dataset and single-regime benchmarks (establish GPU acceleration and autodiff across lensing scales and data types):
- Galaxy-scale CCD imaging: Model JWST COSMOS-Web Ring F150W imaging, including lens-light subtraction and a pixelized source reconstruction, in approximately five minutes.
- Interferometry: Model a real ALMA strong-lensing dataset containing more than one million interferometer visibilities in approximately five minutes.
- Point-source lensing: Model a real multiply imaged quasar or supernova using point-source observables, including image positions and, where available, time delays or flux information, in under five minutes.
- Group-scale strong lensing: Model a real group-scale lens containing multiple deflecting galaxies in under five minutes, demonstrating that PyAutoLens-JAX is not restricted to isolated galaxy-scale lenses.
- Cluster-scale strong lensing: Model a real cluster lens with multiple mass components, multiple images, and potentially multiple source planes in under five minutes.
- Weak lensing: Fit a weak-lensing shear catalogue using a differentiable JAX likelihood in under five minutes, demonstrating that PyAutoLens-JAX is not restricted to strong-lensing data.
Joint and multi-dataset benchmarks (different datasets, lensing regimes, and physical scales combined in a single differentiable, GPU-accelerated probabilistic model):
- Multi-band imaging: Jointly model the four available JWST COSMOS-Web Ring bands, constraining a common lens mass model while fitting the wavelength-dependent lens and source emission in each dataset.
- Joint strong and weak lensing: Constrain a single group- or cluster-scale mass model using both strong-lensing and weak-lensing observables.
- Imaging and point-source lensing: Jointly model extended arcs and point-source constraints from a lensed quasar or supernova within the same lens model.
- Imaging and interferometry: Jointly fit optical or infrared imaging and radio or submillimetre interferometer visibilities, constraining a common mass model using complementary observations of the lensed source.
Pairing requirement: pair each benchmark to the start_here.py file in each autolens_workspace package. For example the JWST COSMOS-Web Ring F150W example, which is made fast, is paired to autolens_workspace/scripts/imaging/start_here.py. All 6 single-dataset start_here.py examples should use real data, and each JOSS example should use the same real data.
The four multi examples pair to examples in autolens_workspace/scripts/multi or scripts/weak/features/strong_lensing. A new multi script will likely be needed for the imaging + point-source lensing joint-modelling benchmark.
Overview
The PyAutoLens-JAX paper draft (
PyAutoLens/paper_jax/paper.md) promises 10 end-to-end benchmarks (6 single-dataset, 4 joint) that do not yet exist. This task creates a new public repoPyAutoLabs/autolens_jax_josscontaining one runnable script per benchmark plus a timing/report harness, and pairs each benchmark to a real-datastart_here.py(ormultifeature script) inautolens_workspace— upgrading the simulated ones to real data. Because these land instart_here.py, they are user-facing far beyond the paper: each rewrite keeps teaching-quality prose, runs on a normal laptop, and auto-downloads its data.Per the paper, every benchmark reports: total wall-clock, JAX compile time, number of likelihood evaluations, post-compile runtime (+ hardware/versions). Official numbers on an NVIDIA A100; scripts reproducible on any GPU/CPU.
Dataset decisions (user-approved): ALMA = SDP.81 · point source = RXJ1131-1231 · cluster + weak + joint strong/weak anchor = Abell 2744 · repo = PyAutoLabs org, public.
Plan
autolens_jax_joss(public) + timing harness + benchmarks already on real data: galaxy-scale imaging (COSMOS-Web Ring F150W) and multi-band (4 bands), paired toimaging/start_here.pyandmulti/start_here.py.interferometer/start_here.py; benchmark.point_source/start_here.py; newmulti/features/imaging_and_point_source/joint script; two benchmarks.cluster/start_here.py; two benchmarks.weak/start_here.pyfrom the real A2744 shape catalogue; joint strong+weak (A2744) and joint imaging+interferometer (SDP.81); three benchmarks; final RESULTS.md sweep.Benchmark ↔ workspace pairing table
scripts/imaging/start_here.pyscripts/interferometer/start_here.pyscripts/point_source/start_here.pyscripts/group/start_here.pyscripts/cluster/start_here.pyscripts/weak/start_here.py(new)scripts/multi/start_here.pyscripts/weak/features/strong_lensing/scripts/multi/features/imaging_and_point_source/(new)scripts/multi/features/imaging_and_interferometer/Detailed implementation plan
Affected Repositories
Branch Survey
Suggested branch:
feature/jax-joss-benchmarksWorktree:
~/Code/PyAutoLabs-wt/jax-joss-benchmarks/Data hosting policy
Large real datasets are never committed: sizeable data (SDP.81 visibilities, A2744 catalogues/imaging, RXJ1131 cutouts) is fetched automatically on first run from a stable public URL (Zenodo preferred;
weak/real_data/a2744.pydownload-and-cache pattern is the template) into gitignoreddataset/paths, with checksum + printed provenance. Small derived products (position/delay JSONs, model CSVs, kB–few-MB) may live indataset/per existing convention.Implementation Steps
gh repo create PyAutoLabs/autolens_jax_joss --public; skeleton: README (pairing table + how to run), LICENSE, .gitignore, requirements.txt,benchmarks/,results/.harness.py: runner recording wall-clock, compile time (first-eval − steady-state), likelihood evals (search counter), post-compile runtime, GPU/CPU + jax/autolens versions →results/<benchmark>.json; regeneratesRESULTS.md.benchmarks/imaging.py+benchmarks/multi_band.py— same data/model family as their paired start_here scripts (MGE lens light + SIE+shear + pixelized source, gradient-based search), tuned toward ~5 min on A100.results/*.json+ regeneratedRESULTS.md.Key Files
autolens_jax_joss/harness.py— timing/report harness (new)autolens_jax_joss/benchmarks/*.py— the 10 benchmarks (new)autolens_workspace/scripts/{interferometer,point_source,cluster}/start_here.py— real-data rewritesautolens_workspace/scripts/weak/start_here.py— new front door for weak lensingautolens_workspace/scripts/multi/features/imaging_and_point_source/— new joint feature scriptPyAutoLens/paper_jax/paper.md— benchmark section these numbers feed (not edited here)Risks
lax.mapbatch_size) rather than fake.Original Prompt
Click to expand starting prompt
Create a repo autolens_jax_joss which provides examples to run each JAX benchmark from the PyAutoLens-JAX paper draft and reports the run time and info. These benchmarks currently do not exist.
Single-dataset and single-regime benchmarks (establish GPU acceleration and autodiff across lensing scales and data types):
Joint and multi-dataset benchmarks (different datasets, lensing regimes, and physical scales combined in a single differentiable, GPU-accelerated probabilistic model):
Pairing requirement: pair each benchmark to the start_here.py file in each autolens_workspace package. For example the JWST COSMOS-Web Ring F150W example, which is made fast, is paired to autolens_workspace/scripts/imaging/start_here.py. All 6 single-dataset start_here.py examples should use real data, and each JOSS example should use the same real data.
The four multi examples pair to examples in autolens_workspace/scripts/multi or scripts/weak/features/strong_lensing. A new multi script will likely be needed for the imaging + point-source lensing joint-modelling benchmark.