Repository navigation
2d: multi_galaxy + group campaign setup (#473) — DRAFT for review before RAL - #484
Merged
Merged
Conversation
… 20 cell scripts)
- scripts/misc/cell_builders/galaxy_group.py: the two datasets (workspace simulator galaxies,
grid, exposure, over-sampling; instrument-preset PSF; multi_galaxy at hst 3.0" mask with the
extra galaxy noise-scaled, group at euclid 7.5" mask), the workspace MGE modeling model with
narrow truth priors, the hst production pixelization at the standard size (Delaunay 1250 + 30,
rectangular 35x35), the seeded iid stream. Stdlib at import.
- scripts/misc/likelihood_breakdown/galaxy_group_standard.py: run_jax_runtime (jit block,
steady median, vmap with OOM halving; parity.json then fit.png), run_jax_breakdown (seven
jitted fit_from prefixes split by successive differences), run_numba_runtime (iid stream,
warm median; parity, fit.png), run_numba_breakdown (eager stage walk, warm medians).
--fast for local checks; without --output-path rows go to output/p2d_local/results/.
- scripts/{multi_galaxy,group}/{mge,rectangular,delaunay}/likelihood_{runtime,breakdown}[_numba].py:
thin wrappers (numba ones pin threads before numpy).
- .gitignore: dataset/multi_galaxy/ (simulated on first use).
Refs autolens_profiling#473
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8QrXN6x7n82QzZyz93
…ew scripts with the gates
- catalogue/registry.json (additive): families multi_galaxy and group, cells
{multi_galaxy/{mge,rectangular,delaunay}/hst, group/{mge,rectangular,delaunay}/euclid}. The
§3.3 rows already route both types to the imaging tables, so the plan is 48 cells
(20 hpc_ral_cpu, 28 hpc_a100); provisional_designations.json is unchanged.
- wall/rates.py: the six JAX runtime scripts take the headline median (HEADLINE_MEDIAN_SCRIPTS).
- tests: NOT_YET_MEASURED gains the six script variants; the driver is a SHARED_RENDERER and is
discarded from the headline-median site scan in favour of its six wrappers.
Refs autolens_profiling#473
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016nhQ8QrXN6x7n82QzZyz93
…t submitted) - The 48-cell manifest on _common.py (unchanged; 2a and 2b --check byte-identical), pin 2026.10.25.1 from the private checkout, prepare_dataset by instrument (hst -> multi_galaxy, euclid -> group) under a lock. - Batch 0 (D9): every group leg, RAL array of 10 (%8) and A100 array of 14 (%2), 4:00:00 and 32 GB per task, WALL-BASIS unmeasured guesses of 3600 s (3x floor). - Batch 1: one ral array (10) and one --gres=gpu:1 job (14) per dataset type, WALL_BASIS_STATUS=provisional: placeholder --time / --mem and a submit that refuses to run. - Tests (test_multi_galaxy_group_p2d.py) and a README section. Refs autolens_profiling#473 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8QrXN6x7n82QzZyz93
… decisions D1-D11 wiki/campaigns/multi_galaxy/likelihood_lifecycle_p2d.md (shared page) and wiki/campaigns/group/likelihood_lifecycle_p2d.md record the rule (48/48 current, parity match at 1e-4 x |reference|), the expected verdict, the draft decisions awaiting the human, the batch plan, and a workspace finding (multi_galaxy mask_extra_galaxies invert=True scales the complement). Indexed in wiki/index.md. Refs autolens_profiling#473 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8QrXN6x7n82QzZyz93
…48 planned cells Regenerated with the committed render stamp and producer revision (build_catalogue -> build_dashboard -> coverage_matrix): planned cells 222 -> 270 (+48 multi_galaxy / group, all missing); 106 current, 7 stale, 157 missing. build_catalogue --check --validate-with ../PyAutoPulse is valid. Generated files only, in one commit for an easy rebase. Refs autolens_profiling#473 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8QrXN6x7n82QzZyz93
…gue and coverage Merges feature/likelihood-lifecycle-planner-gpu-hosts: a jax_gpu_* setup is planned only on a gpu_hosts host. The conflicted generated files (dashboard/catalogue.json, coverage.json, coverage.md) were re-rendered with the committed render stamp and producer revision (build_catalogue -> build_dashboard -> coverage_matrix): planned cells 270 -> 268 (the two point_source_source jax_gpu_na_fp64@hpc_ral_cpu cells), parity setup cells 135 -> 134. 2d's plan is unchanged: the §3.3 imaging tables list no GPU setup at hpc_ral_cpu for the multi_galaxy / group cells, so they stay 48 (20 hpc_ral_cpu, 28 hpc_a100). Refs autolens_profiling#473 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…0.11.2 XLA:CPU deadlock (D12) - galaxy_group_standard.py: the jitted functions take the instance's flat pytree leaves and unflatten inside the trace (dPIEMassSph computes b0 from sigma in its constructor, so jax.jit(f).lower(tree) cannot rebuild it from abstract ArgInfo leaves: the group cells); the breakdown's ray-trace prefix passes xp=jnp (the NumPy default raised TracerArrayConversionError in every JAX breakdown). - D12: the JAX legs append --xla_cpu_multi_thread_eigen=false to XLA_FLAGS before the backend starts, recorded in device.xla_flags and configuration.xla_cpu_workaround. Without it every 2d JAX CPU executable deadlocked after 1 to ~35 calls (0 % CPU, Execute -> BlockUntilReady futex wait). Reproduced from the exported StableHLO in a process importing only jax; either multi_thread_eigen=false or concurrency_optimized_scheduler=false avoids it, the first at near the default's per-call cost. Not a PyAuto bug; not patched in any library. - Campaign pages: D12 row, the deadlock evidence (bisection, native stacks, minimal repro, flag table, RAL-on-the-pin assessment), journal entries (incl. the #481 merge: 2d stays 48). Refs autolens_profiling#473 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- baseline/campaign.json (draft): re-pin the catalogue/registry.json inventory hash and add the six multi_galaxy / group setups (same null template as the imaging setups). - test_baseline_readiness: 29 -> 35 setups (counts 620/366/58 -> 680/510/70; missing 986 -> 1190). - timing_noise_audit_2026_10.md: the 2d generator's WALL_HEADROOM / MEM_HEADROOM and the headline-median test listed as non-gates, as 2a and 2b (list_timing_assertions --check). Refs autolens_profiling#473 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from
feature/likelihood-lifecycle-p2b-interferometer
to
main
October 29, 2026 14:46
…=false Human ruling, verbatim: "keep the workaround which ensures we retain the fastest run times and make sure this knowledge is retained in Pulse for going forward". D12 stands as drafted; the driver already appends the flag (galaxy_group_standard.py, XLA_CPU_WORKAROUND_FLAG), so no code changes. Marks D12 decided on the shared and group campaign pages, the wiki index and the campaigns README; adds a journal entry and links the Pulse knowledge page and decision record (PyAutoPulse#81). Corrects the scheduler-flag cost note: about 2x the eigen flag on MGE, within ~15 % on the pixelized cells. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…submits, one flag for every cell - galaxy_group_standard.py: the scheduler flag is about 2x slower than the eigen flag on the MGE cells and within ~15 % on the pixelized cells (the old ~2.4x was against the hanging default). - multi_galaxy_group_p2d.py: the submit header says D1-D11 open, D12 decided; submits re-rendered with --write (--check and wall/check_submits pass). - Campaign page: D12 records the human's 2026-10-29 ruling of one flag for every cell; the per-variant scheduler-flag option is marked not taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated files (catalogue, dashboard, coverage, setup wiki, series id map) re-rendered with the committed stamp. Non-generated conflicts combined: both 2d and 2e entries in the campaigns README (module table, commands, one section each), timing-noise audit, wiki index, wall/rates.py HEADLINE_MEDIAN_SCRIPTS, the headline-completion and fit.png site lists; baseline inventory hash re-frozen on the merged registry; test_baseline_readiness counts for 36 setups (base 29, +1 2e, +6 2d: unverified 708, unsupported 516, not_applicable 72, missing 1224/1223). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jammy2211
marked this pull request as ready for review
October 29, 2026 16:22
Jammy2211
added a commit
that referenced
this pull request
Oct 29, 2026
…erage Generated files re-rendered with the committed stamp (build_catalogue -> build_dashboard -> coverage_matrix -> build_setup_wiki -> build_series_id_map): 280 planned cells. registry.json and baseline/campaign.json are main plus 2g's weak/isothermal/simple cell, inventory hashes recomputed; test_baseline_readiness follows (37 setups: 718/540/74, missing 1258/1257). README, wiki index, wall/rates.py and the results-mirror list keep both 2d and 2g entries. Refs autolens_profiling#476 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jammy2211
added a commit
that referenced
this pull request
Oct 29, 2026
…e and coverage Generated files re-rendered with the committed stamp (build_catalogue -> build_dashboard -> coverage_matrix -> build_setup_wiki -> build_series_id_map): 272 planned cells (2f's D1 plans the dense datacube NUFFT route at sma only). baseline/campaign.json inventory hashes recomputed; test_baseline_readiness follows (37 setups: 730/528/74; 2f moves the 12 multi_dataset/delaunay cells from unsupported to unverified). README, wiki index, timing audit, wall/rates.py and the fit.png / headline-completion site lists keep both 2d/2g and 2f entries. Refs autolens_profiling#475 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jammy2211
added a commit
that referenced
this pull request
Oct 29, 2026
… catalogue and coverage Generated files re-rendered with the committed stamp (build_catalogue -> build_dashboard -> coverage_matrix -> build_setup_wiki -> build_series_id_map): 272 planned cells, 116 current, 1 stale. README, wiki index, timing audit and the fit.png site comment keep both sides. Refs autolens_profiling#472 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jammy2211
added a commit
that referenced
this pull request
Oct 29, 2026
…egenerate catalogue and coverage Generated files re-rendered with the committed stamp: 272 planned cells, 176 current, 0 stale. provenance_grandfathered.txt keeps main's order with 2b's 21 history moves applied; baseline/campaign.json inventory hashes recomputed; the wiki index keeps 2b's updated row and main's 2c-2g rows. Includes the dashboard refusal-guard fix (human ruling 2026-10-29, option A). Refs autolens_profiling#469 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 2d setup (autolens_profiling#473):
multi_galaxy/{mge,rectangular,delaunay}at hst andgroup/{mge,rectangular,delaunay}at euclid, at the standard size on pin 2026.10.25.1, on the §3.3 "as imaging" setups. Stacked on #471 (2b). This is a draft for the human's review. Nothing has been submitted to RAL, and no batch has a go.scripts/misc/cell_builders/galaxy_group.py: builds both datasets from the workspace simulators, the workspace MGE modeling model with narrow truth priors, the standard-size hst production pixelization (Delaunay 1250 + 30, rectangular 35x35), and the seeded iid stream.scripts/misc/likelihood_breakdown/galaxy_group_standard.py: the shared driver. JAX runtime (jit block, steady median, vmap with OOM halving, thenparity.jsonandfit.png), JAX breakdown (seven jittedfit_fromprefixes split by successive differences), numba runtime (warm iid median) and numba eager stage-walk breakdown.scripts/{multi_galaxy,group}/<variant>/.catalogue/registry.jsondeclares the 48 cells.scripts/misc/campaigns/multi_galaxy_group_p2d.py+ tests + thesubmit_campaign_p2d_*submits: batch 0 is every group leg; batch 1 isWALL_BASIS_STATUS=provisionaland refuses to run.wiki/campaigns/multi_galaxy/likelihood_lifecycle_p2d.md(shared page with decisions D1-D12) andwiki/campaigns/group/likelihood_lifecycle_p2d.md.Decisions awaiting the human
The full table, with reasons and alternatives, is on the shared campaign page.
mge,rectangular,delaunayfor both types (nodelaunay_nn, nosersic).hst, group ateuclid, with the instrument-preset PSF.dPIEMassSph(sigma free). Priors are narrow Gaussians on the truth.provisional_designations.json).AnalysisImaging.fit_from(JAX prefixes / numba lazy stages).--xla_cpu_multi_thread_eigen=falsetoXLA_FLAGS(done in the driver; recorded indevice.xla_flagsandconfiguration.xla_cpu_workaround). The 2a/2b JAX CPU rows did not use this compile option. Alternatives:--xla_cpu_enable_concurrency_optimized_scheduler=false(about 2x slower per call than the eigen flag on the MGE cells; within ~15 % on the pixelized cells); drop the JAX CPU setups; or wait for a fixed jaxlib.D12 decided (human, 2026-10-29), verbatim: "keep the workaround which ensures we retain the fastest run times and make sure this knowledge is retained in Pulse for going forward". D12 stands as drafted. The driver already applies
--xla_cpu_multi_thread_eigen=false(XLA_CPU_WORKAROUND_FLAGingalaxy_group_standard.py), so there is no code change (commit 1f68115 marks it on the pages). The knowledge is kept in Pulse (PyAutoPulse#81): knowledge page and decision record.The hang: an XLA:CPU deadlock (jax/jaxlib 0.11.2)
Symptom. Lower, compile and the first call succeed. A later call of the same compiled executable never returns. The process sits at 0 % CPU. Native stacks (
py-spy record --native --idle, started as parent) showCpuPjRtRawLoadedExecutable::Execute->tsl::BlockUntilReady->absl::Mutexfutex wait, and no thread is doing work. Which call hangs varies from run to run. It affects every cell, not only group: multi_galaxy/rectangular dense hung on call 2 too, so the earlier "PASS" was luck.Ruled out:
JAX_ENABLE_COMPILATION_CACHE=false);pure_callback(MGE has no host callback and still hangs);constant_foldingflag (hangs without it).A plain jitted
A.T @ Aat the cell's size, with or without a scipypure_callback, is fine. Prefix bisection: group MGE hangs from prefix 3 (data vector) and group Delaunay from prefix 4 (curvature matrix).Minimal repro, with no PyAuto code in the process.
jax.exportthe group MGE prefix-3 function, then in a freshpython -Iprocess that imports only jax, compile it and call it 300 times. With the default flags it deadlocks at call ~14. With either--xla_cpu_multi_thread_eigen=falseor--xla_cpu_enable_concurrency_optimized_scheduler=falseall 300 calls complete. This is an XLA:CPU bug, not a PyAuto one. No library is patched. It is worth a JAX issue with the exported module.Flag sweep on the full pipelines (laptop, 8 cores; calls completed / steady median):
multi_thread_eigen=falseconcurrency_optimized_scheduler=falseTracer.traced_grid_2d_list_from,dPIEMassSph: no diff), so the two driver fixes apply there too.hpc_ral_cpupoint_source_source rows record jaxlib 0.11.2. RAL therefore runs the same XLA:CPU.Smoke table (laptop, 8 cores,
--fast --config-name local_cpu_fp64, local library mains, not the pin)All 28 scripts ran serially with a 40-min timeout each, with D12 in effect for the JAX legs. Every runtime row wrote
parity.json(match) andfit.png. The group/delaunay figure was opened and looks right. "block" is the steady block mean, "median" the steady median, and "vmap" the batch-2 per call. Δ is |log L − reference|.group/delaunay/likelihood_runtimegroup/mge/likelihood_runtimemulti_galaxy/mge/likelihood_runtimegroup/mge/likelihood_breakdownmulti_galaxy/mge/likelihood_breakdowngroup/delaunay/likelihood_runtime--sparsegroup/delaunay/likelihood_breakdowngroup/delaunay/likelihood_breakdown--sparsegroup/rectangular/likelihood_runtimegroup/rectangular/likelihood_runtime--sparsegroup/rectangular/likelihood_breakdowngroup/rectangular/likelihood_breakdown--sparsemulti_galaxy/rectangular/likelihood_runtimemulti_galaxy/rectangular/likelihood_runtime--sparsemulti_galaxy/rectangular/likelihood_breakdownmulti_galaxy/rectangular/likelihood_breakdown--sparsemulti_galaxy/delaunay/likelihood_runtimemulti_galaxy/delaunay/likelihood_runtime--sparsemulti_galaxy/delaunay/likelihood_breakdownmulti_galaxy/delaunay/likelihood_breakdown--sparsegroup/delaunay/likelihood_runtime_numbagroup/delaunay/likelihood_breakdown_numbagroup/rectangular/likelihood_runtime_numbagroup/rectangular/likelihood_breakdown_numbamulti_galaxy/delaunay/likelihood_runtime_numbamulti_galaxy/delaunay/likelihood_breakdown_numbamulti_galaxy/rectangular/likelihood_runtime_numbamulti_galaxy/rectangular/likelihood_breakdown_numbaCell counts
48 planned cells, each with a runtime and a breakdown row:
hpc_ral_cpu, 28hpc_a100;The #481 merge leaves 2d unchanged. The catalogue's planned total is 268 (106 current, 7 stale, 155 missing), and the parity setup cells are 134.
Verified
ruff check .andruff format --check .pass.pytest scripts/misc/*/test: 1834 passed, 16 skipped. The known environmental failurehazards/test/test_hazards_prior_exit.py::test__records_the_clipper_as_what_blocks_itwas deselected.build_readme --checkbuild_catalogue --check --validate-with PyAutoPulseparity_witness --checkcoverage_matrix --checkcheck_wiki --checkbuild_dashboard --checkcheck_results_layout --checkwall/check_submits --checklist_timing_assertions --checkmulti_galaxy_group_p2d.py --check, plusimaging_p2a.py --checkandinterferometer_p2b.py --check, which are byte-identical (_common.pyis unchanged).baseline/campaign.jsonre-pins the registry hash and adds the 6 setups (test_baseline_readinesscounts 29 -> 35 setups);WALL_HEADROOM/MEM_HEADROOM. This was missing in the earlier 2d commits, solist_timing_assertions --checkwas failing.Remains
--fastrepeat counts.mask_extra_galaxiesinversion (campaign page).Refs #473
🤖 Generated with Claude Code