feat: Phase 2 — mirror simulator profiling scripts#9
Merged
Conversation
Phase 2 of the autolens_profiling z_feature roadmap. Mirrors the 6
simulator-profiling scripts from autolens_workspace_developer/jax_profiling/
simulators/ into autolens_profiling/simulators/. _developer stays the
source of truth — the originals do not move.
Files mirrored (6 scripts, ~2040 LOC, all from clean origin/main of _developer):
jax_profiling/simulators/imaging.py -> simulators/imaging.py
jax_profiling/simulators/interferometer.py -> simulators/interferometer.py
jax_profiling/simulators/point_source.py -> simulators/point_source.py
jax_profiling/simulators/cluster.py -> simulators/cluster.py
jax_profiling/simulators/group.py -> simulators/group.py
jax_profiling/simulators/multi.py -> simulators/multi.py
Path rewrites applied uniformly across all 6 scripts:
- _workspace_root / "jax_profiling" / "dataset" -> _workspace_root / "dataset"
- _workspace_root / "jax_profiling" / "results" / "simulators"
-> _workspace_root / "results" / "simulators"
- _script_dir.parents[1] -> _script_dir.parents[0]
(scripts are one level shallower in the new layout —
simulators/<name>.py vs jax_profiling/simulators/<name>.py)
- Docstring example commands: `python jax_profiling/simulators/<name>.py`
-> `python simulators/<name>.py`
The artifact filename convention is unchanged:
results/simulators/<script>_summary_v<al.__version__>.{json,png}
simulators/README.md replaces the Phase 0 placeholder with a section
narrative covering what each simulator profiles, run instructions
(including the dataset_name collision warning for point_source — its
default writes to dataset/point_source/simple/ which holds Phase 1's
tracked likelihood input JSONs), versioned artifact convention, the
headline run-times table placeholder for Phase 4's dashboard, and a
JIT-readiness audit per script.
Smoke status: py_compile + rewrite verification PASSED for all 6 scripts.
Full runtime smoke (each simulator run-to-completion) was intentionally
skipped — running simulators/point_source.py at default dataset_name="simple"
would overwrite Phase 1's tracked point_dataset_positions_only.json and
tracer.json (corrupting the likelihood inputs). Phase 5's
AUTOLENS_PROFILING_SMOKE=1 short-circuit will provide a clean smoke path;
until then the static checks + matching the Phase 1/3 pattern give
sufficient confidence to ship.
F1 lesson applied: copies came from worktree's clean origin/main of
_developer (NOT the canonical, which is dirty with ~36 modified files).
Closes #4.
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 2 of the autolens_profiling z_feature roadmap — mirrors the 6 simulator-profiling scripts from
autolens_workspace_developer/jax_profiling/simulators/(~2,040 LOC across imaging, interferometer, point_source, cluster, group, multi) into the new repo atsimulators/._developerstays the source of truth — the originals do not move.Closes #4.
What changed
origin/mainof_developer/jax_profiling/simulators/→autolens_profiling/simulators/._workspace_root / \"jax_profiling\" / \"dataset\"→_workspace_root / \"dataset\"_workspace_root / \"jax_profiling\" / \"results\" / \"simulators\"→_workspace_root / \"results\" / \"simulators\"_script_dir.parents[1]→_script_dir.parents[0](scripts are one level shallower in the new layout —simulators/<name>.pyvsjax_profiling/simulators/<name>.py)python jax_profiling/simulators/<name>.py→python simulators/<name>.pysimulators/README.mdreplaces the Phase 0 placeholder. Covers: what each simulator profiles, the dataset_name collision warning forpoint_source.py, versioned artifact convention, headline run-times table placeholder for Phase 4's dashboard, and a per-script JIT-readiness audit.Artifact filename convention is unchanged:
results/simulators/<script>_summary_v<al.__version__>.{json,png}.Test plan
py_compilePASSES for all 6 mirrored scripts.grep -r jax_profilingreturns no residual references in the mirrored scripts.dataset/<type>/<name>/write target verified to resolve correctly with_script_dir.parents[0](one level shallower than Phase 1'sparents[1])..gitignorefrom Phase 1 already covers the regenerable dataset variants (dataset/{cluster,group,multi}/,*/simple/), so smoke runs that use defaultdataset_name = \"simple\"won't leak binary outputs.simulators/point_source.pyat defaultdataset_name=\"simple\"would overwrite Phase 1's trackeddataset/point_source/simple/{point_dataset_positions_only.json,tracer.json}(corrupting the likelihood inputs that Phase 1 specifically locked in). Phase 5 (issue #7) will land theAUTOLENS_PROFILING_SMOKE=1env-var short-circuit that makes future smokes cheap and side-effect-free. Until then, smoke manually by passing a non-conflictingdataset_name(e.g.\"smoke\").F1 lesson applied
Copies came from the worktree's clean
origin/mainof_developer— not the canonical (which is dirty with ~36 modified files, the same condition that motivated F1's re-mirror PR #3 for Phase 1).Notes for Phase 4
point_source.pyexercises a JIT'dsolver.solveand asserts eager ≡ JIT. This is the same assertion that drifted upstream and is tracked under PyAutoLens#514. Phase 4's dashboard cell forpoint_source/simulatormay showERRorpending upstreamuntil that resolves — same handling as the likelihood-side point_source drift.Refs
0087d6a.🤖 Generated with Claude Code