feat: Phase 1 — mirror JIT likelihood profiling scripts#2
Merged
Conversation
…se 1)
Phase 1 of the autolens_profiling z_feature roadmap. Mirrors the JIT
likelihood profiling scripts and their pre-existing tracked input datasets
from PyAutoLabs/autolens_workspace_developer/jax_profiling/jit/ into this
repo. _developer remains the source of truth — no scripts or data are
moved or deleted upstream.
Scripts mirrored (9 .py + 1 __init__.py, verbatim filenames):
likelihood/imaging/{mge,pixelization,delaunay}.py
likelihood/interferometer/{mge,pixelization,delaunay}.py
likelihood/point_source/{image_plane,source_plane}.py
likelihood/datacube/{__init__.py,delaunay.py}
Datasets mirrored (14 files, ~900K, checksums verified identical to source):
dataset/imaging/hst/, dataset/imaging/source_complex/
dataset/interferometer/sma/
dataset/point_source/simple/
Path rewrites applied uniformly across all 9 scripts:
- Path("jax_profiling") / "dataset" / ... -> Path("dataset") / ...
- _script_dir.parents[2] -> _script_dir.parents[1] (one fewer level in
the new layout: likelihood/<type>/<script>.py vs jax_profiling/jit/...)
- _workspace_root / "jax_profiling" / "results" / "jit" / <type>
-> _workspace_root / "results" / "likelihood" / <type>
- Docstring sibling-script and dataset refs rewritten to the new layout.
The autolens_profiling repo does not include dataset_setup/ regeneration
scripts (out of scope for Phase 1). The if should_simulate(...) block at
the top of each script is replaced with a clear FileNotFoundError that
points readers back at autolens_workspace_developer/jax_profiling/dataset_setup/
for regeneration. Default smoke runs use the pre-mirrored HST / SMA /
simple datasets and never trigger this path.
READMEs authored:
- likelihood/README.md (replaces Phase 0 placeholder) — section overview,
what JIT likelihood profiling means, how to read per-script output,
versioned-artifact convention, conventions inherited from _developer.
- likelihood/{imaging,interferometer,point_source,datacube}/README.md —
per-section narrative, script tables, default datasets, headline
run-time table placeholder for Phase 4's auto-generated dashboard.
.gitignore extended:
- dataset/{cluster,group,multi}/, dataset/{imaging,interferometer}/simple/,
dataset/point_source/simple/*.fits + *.csv — regenerable variants.
- dataset/datacube/sim_*/ — datacube simulator outputs.
- results/{likelihood,simulators,searches}/ — per-run profiling artifacts;
Phase 4's dashboard will explicitly select which to commit.
Smoke runs (all 4 ran end-to-end on CPU; artifacts landed at expected
paths):
- imaging/mge.py [hst] — artifacts ✓; regression assertion pre-existing
drift (constant unchanged from _developer; same drift would manifest
upstream on PyAutoLens 2026.5.14.2).
- interferometer/mge.py [sma] — artifacts ✓; all assertions PASSED.
- point_source/image_plane.py [simple] — artifacts ✓; regression
assertion pre-existing drift (same as above).
- datacube/delaunay.py [sma × 4] — artifacts ✓; both eager and
full-pipeline cube regression assertions PASSED.
Closes #1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of the autolens_profiling z_feature roadmap — mirrors the JIT likelihood profiling scripts and their input datasets from
autolens_workspace_developer/jax_profiling/jit/into this repo atlikelihood/anddataset/._developerremains the source of truth; nothing is moved or deleted upstream.Closes #1.
What changed
__init__.pymirrored atlikelihood/{imaging,interferometer,point_source,datacube}/. Filenames preserved verbatim. The step-by-step profile narrative each script prints is unchanged.dataset/{imaging/hst, interferometer/sma, point_source/simple}/. Checksums identical to source.likelihood/README.md(replacing the placeholder from Phase 0) plus one per subfolder. Each per-section README covers what the likelihood path profiles, scripts available, default dataset, and a headline run-time table placeholder for Phase 4's dashboard..gitignoreextended to cover regenerable dataset variants (dataset/{cluster,group,multi}/,*/simple/data files) and per-run profiling artifacts underresults/likelihood/.Path rewrites (mechanical, uniform across all 9 scripts)
Path("jax_profiling") / "dataset" / ...Path("dataset") / ..._script_dir.parents[2]_script_dir.parents[1]_workspace_root / "jax_profiling" / "results" / "jit" / <type>_workspace_root / "results" / "likelihood" / <type>``jax_profiling/{jit,imaging,interferometer,…}/````likelihood/...``and`dataset/...`The artifact filename convention is preserved verbatim:
<script>_likelihood_summary_<instrument>_v<al.__version__>.{json,png}.Dataset regeneration is documented, not bundled
The new repo does not include
dataset_setup/regeneration scripts (out of scope for Phase 1). Theif should_simulate(...)block at the top of each script is replaced with a clearFileNotFoundErrorthat points readers back at the source-of-truth regen scripts inautolens_workspace_developer/jax_profiling/dataset_setup/. Default smoke runs use the pre-mirrored HST / SMA / simple datasets and never trigger this path.Decisions captured
dataset/, notlikelihood/dataset/. Reason: Phase 2 (simulators) and Phase 3 (Nautilus) will consume the same input data and a shared folder avoids duplication.Test plan — smoke results (all 4 ran end-to-end on CPU)
likelihood/imaging/mge.pymge_likelihood_summary_hst_v2026.5.14.2.{json,png}_developer/jax_profiling/jit/imaging/mge.py— script logic identical, constantEXPECTED_LOG_LIKELIHOOD_HSTunchanged)likelihood/interferometer/mge.pymge_likelihood_summary_sma_v2026.5.14.2.{json,png}likelihood/point_source/image_plane.pyimage_plane_summary_v2026.5.14.2.{json,png}EXPECTED_LOG_LIKELIHOOD_IMAGE_PLANEunchanged from_developer— same script logic)likelihood/datacube/delaunay.pydelaunay_likelihood_summary_sma_v2026.5.14.2.{json,png}Mirror-vs-source diff verified clean: only the documented path rewrites and the should_simulate-block replacement changed. The regression-constant drifts pre-date this PR and would manifest if the corresponding scripts in
autolens_workspace_developer/jax_profiling/jit/were rerun on PyAutoLens2026.5.14.2. They are independent of the mirror and should be triaged in their own issue against_developer(or the constants refreshed and re-committed if the new values are correct).Phase 0 bootstrap commit (for context): 0087d6a