Overview
Completes PyAutoMind feature/cluster/5_profiling.md (the last pre-LensTool item of the cluster home straight): two scripts in likelihood_breakdown/cluster/ giving the per-step JIT timing decomposition of the cluster point-source likelihoods, in the house style of likelihood_breakdown/imaging/* (per-step jit_profile lower/compile/first/steady-state, JSON + bar chart into results/breakdown/cluster/, AUTOLENS_PROFILING_SMOKE=1 short-circuit, CPU fp64 single-config).
Autonomy: supervised --auto (user directive 2026-07-09: "do the next task --auto"; heart-ack carried in-session).
Plan
likelihood_breakdown/cluster/source_plane.py — decomposes FitPositionsSource for the standard cluster model (2 main dPIE + 10 scaling members + NFW host at z=0.5; sources at z=1.0/2.0): tracer build from the workspace dataset CSVs → multi-plane traced grids (the 149-free… 14-profile deflection stack is the expected hot spot) → per-system centroid + chi² → likelihood assembly. Known constraint designed around: the full source-plane chi² is JIT-blocked (workspace_test table), so steps are JIT-profiled individually where traceable with the eager reference asserted at rtol=1e-4, and the blocked step documented.
likelihood_breakdown/cluster/image_plane.py — decomposes FitPositionsImagePairRepeat: tracer build → triangle-tiling PointSolver solve per source plane (dominant; JAX-jitted per the simulators/cluster.py jitted_solve precedent) → Hungarian pairing → chi². Per-plane timing table so the multi-plane fan-out cost is visible.
- Both consume
autolens_workspace/dataset/cluster/simple via the standard auto-sim guard (regenerates through the workspace simulator, current reference-anchored truth), mirroring how simulators/cluster.py resolves _workspace_root.
- README auto-table hookup via the existing
results/breakdown/ artifact convention.
Affected Repositories
- autolens_profiling (primary) — parallel to the active
profiling-preopt-campaign claim; its diff is likelihood_runtime/sweep.py + scripts/build_baseline.py, disjoint from the new likelihood_breakdown/cluster/; re-verify at ship.
Branch: feature/cluster-likelihood-breakdown · Worktree: ~/Code/PyAutoLabs-wt/cluster-likelihood-breakdown/
Follow-up noted (not this task)
simulators/cluster.py (run-time tracking) predates the scaling-member tier and the reference-anchored truth relation — it writes a 5-component model into the shared workspace dataset path and would fight the current workspace simulator if run. Needs a small sync task.
Original Prompt
Click to expand
$(cat PyAutoMind/feature/cluster/5_profiling.md)
Overview
Completes PyAutoMind
feature/cluster/5_profiling.md(the last pre-LensTool item of the cluster home straight): two scripts inlikelihood_breakdown/cluster/giving the per-step JIT timing decomposition of the cluster point-source likelihoods, in the house style oflikelihood_breakdown/imaging/*(per-stepjit_profilelower/compile/first/steady-state, JSON + bar chart intoresults/breakdown/cluster/,AUTOLENS_PROFILING_SMOKE=1short-circuit, CPU fp64 single-config).Autonomy: supervised
--auto(user directive 2026-07-09: "do the next task --auto"; heart-ack carried in-session).Plan
likelihood_breakdown/cluster/source_plane.py— decomposesFitPositionsSourcefor the standard cluster model (2 main dPIE + 10 scaling members + NFW host at z=0.5; sources at z=1.0/2.0): tracer build from the workspace dataset CSVs → multi-plane traced grids (the 149-free… 14-profile deflection stack is the expected hot spot) → per-system centroid + chi² → likelihood assembly. Known constraint designed around: the full source-plane chi² is JIT-blocked (workspace_test table), so steps are JIT-profiled individually where traceable with the eager reference asserted at rtol=1e-4, and the blocked step documented.likelihood_breakdown/cluster/image_plane.py— decomposesFitPositionsImagePairRepeat: tracer build → triangle-tiling PointSolver solve per source plane (dominant; JAX-jitted per thesimulators/cluster.pyjitted_solveprecedent) → Hungarian pairing → chi². Per-plane timing table so the multi-plane fan-out cost is visible.autolens_workspace/dataset/cluster/simplevia the standard auto-sim guard (regenerates through the workspace simulator, current reference-anchored truth), mirroring howsimulators/cluster.pyresolves_workspace_root.results/breakdown/artifact convention.Affected Repositories
profiling-preopt-campaignclaim; its diff islikelihood_runtime/sweep.py+scripts/build_baseline.py, disjoint from the newlikelihood_breakdown/cluster/; re-verify at ship.Branch:
feature/cluster-likelihood-breakdown· Worktree:~/Code/PyAutoLabs-wt/cluster-likelihood-breakdown/Follow-up noted (not this task)
simulators/cluster.py(run-time tracking) predates the scaling-member tier and the reference-anchored truth relation — it writes a 5-component model into the shared workspace dataset path and would fight the current workspace simulator if run. Needs a small sync task.Original Prompt
Click to expand
$(cat PyAutoMind/feature/cluster/5_profiling.md)