Repository navigation
feat(fixed-light): lever 3 verdict — shared Cholesky log det(F+λH) 1.19x on numba CPU; phase 3 = 1.80x (#267) - #272
Merged
Conversation
…267) Lever 1 of the numba CPU levers task replaced the two pure-Python loops in PyAutoArray's split-regularization assembly (`reg_split_np_from`, `pixel_splitted_regularization_matrix_np_from`) with numba kernels, keeping the original loop bodies as `_reg_split_reference` / `_pixel_splitted_regularization_matrix_reference`. This adds the measurement and correctness legs for that lever. * `hpc/batch_cpu/submit_breakdown_imaging_fixed_light_numba_levers_delaunay_ral_hst_fp64` — one job, two arms: phase 2's Leg D (route b, sparse_numba, memo ON, threads 1, n-repeats 16, iid) run against a private merge-base checkout (5e2bc0f4) and against the lever branch (bae9296e), each in its own subshell with its own PYTHONPATH prepend and numba cache, each printing `autoarray.__file__` and its checkout's HEAD. `gpu` partition CPUs-only, no --gres. * `hpc/batch_gpu/submit_breakdown_imaging_fixed_light_numba_levers_delaunay_a100_hst_fp64` — the same two arms of `delaunay.py --regularization adapt_split --split-setup --vmap-batch 16`. Lever 1 changed only the `xp == np` branch and this cell builds H with `xp=jnp`, so the expectation is identity; the row exists to confirm the #536 compacted scatter is the path that runs and to record the measured H. * `scripts/imaging/likelihood_breakdown/fixed_light_numba_levers_witness.py` — W1 bit-identity of `inversion.regularization_matrix` against the reference chain (`np.array_equal`), W2 the interpolator's cached stencil tables are unmutated, W3 the fit's `figure_of_merit` is unchanged when both numpy entry points are monkeypatched to the references. PASSes locally on the HST Delaunay N=1500 source-only AdaptSplit system with all three differences exactly 0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n numba CPU, A100 identity (#267) RAL job 343345 (gpu partition CPUs-only, 1 thread, private merge-base control): route b memo-ON whole call 413.301 -> 299.709 ms, inversion.regularization_matrix 110.599 -> 5.924 ms; all cell gates PASS; witness W1-W3 PASS (H bit-identical, tables unmutated, log evidence relative diff 0.0). RAL job 343346 (A100 fp64): identity to 0.03 % on the H prefix; the #536 compaction constants are inert at K=4. Note: results/notes/fixed_lens_light_levers_2026_09.md (levers 2-3 pending). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
#267) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…CPU, A100 identity, CPU-only lever (#267) RAL job 343353 (gpu partition CPUs-only, 1 thread, control = lever 1): route b memo-ON whole call 302.709 -> 267.448 ms, inversion.log_det_regularization_matrix_term 37.480 -> 6.508 ms; all cell gates PASS; witness W1-W5 PASS (route fires once, log det rel 1.2e-9, log evidence rel 2.3e-10, gates admit, 6.0x same-matrix). RAL job 343354 (A100 fp64, fixed_light.py): all log_evidence_terms bit-identical; the A100's dense Cholesky of H is 1.13 ms, so the lever stays on the numpy path. Cumulative levers 1+2 vs merge base: 413.3 -> 267.4 ms (1.55x). Note section added to results/notes/fixed_lens_light_levers_2026_09.md (lever 3 pending). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… curvature_reg_matrix cache handshake (#267) Lever 3 (PyAutoArray b4322c3e, stacked on lever 2 0b17c292) publishes the NNLS solve's Cholesky factor through an optional `factor` out-dict and reads `log det(F + λH)` off it via a Schur complement over the ~15 active columns, instead of factorising the same (1500, 1500) matrix a second time; it also makes `curvature_reg_matrix` a `cached_property`. CPU A/B submit (control = lever 2, feature = lever 3), A100 A/B submit on `fixed_light.py`, and a W1-W5 witness. Witness PASS locally: fast path fires exactly once, k_active 1485 == len(passive_set) with 15 active columns, log det Δ +1.819e-12 nats (rel 2.2e-16, gate 1e-10 — three decades tighter than lever 2's), figure_of_merit BIT-IDENTICAL, reconstruction byte-identical, `curvature_reg_matrix` the same object on two accesses; site timing 54.0 -> 7.5 ms (7.2x) plus one 3.6 ms `_xp.add(F, H)` build. Profiling-side handshake, correct only against lever 3's PyAutoArray: the `inversion.curvature_reg_matrix` site spec now declares the site cached, and `test_curvature_reg_matrix_is_recomputed_more_than_once` became `test_curvature_reg_matrix_is_cached` asserting `n_calls == 1`. Measured: 27 passed against b4322c3e; against 0b17c292 that one test fails with `n_calls == 2` and nothing else does. CI checks out PyAutoArray with no `ref:` (its default branch), so this branch is RED on that one test until the library PR merges. The spec's `cached=` flag is read off the installed class rather than written as a literal `True`, because this job runs ONE checkout of the cell against TWO PyAutoArray revisions: a literal would fire the cell's `cached_site_call_count_violations` AssertionError in the control arm and kill the control arm of the measurement the gate exists to serve. Both descriptor types are recognised — PyAutoArray decorates with `autonerves.cached_property`, not `functools.cached_property`. The unconditional pin stays in the test. Also: `numpy_solver_injected`'s `patched()` now accepts and clears the `factor` out-dict (forwarding it to the library only when the signature has it), without which route `d_np` raises `TypeError: patched() got an unexpected keyword argument 'factor'` under lever 3. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…A gate is a coin flip at 224 ms (#267) Job 343355's feature arm measured 224.330 ms and then died on the ABBA instrumentation-overhead gate (1.0366 > 1.03 over 8 blocks), taking its result JSON with it, while its control arm passed the same gate at 1.0182. The recorded lever-1/2 rows show that ratio climbing purely as the call shortens (1.0147 at 413.301 ms, 1.0167 at 302.709, 1.0163 at 299.709, 1.0221 at 267.448, 1.0182 at 268.681) against a 16-29 % clean-call spread, with the same per-block pattern in every run, so at lever 3's ~224 ms the threshold sits inside the estimator's own standard error for BOTH arms. 64 repeats gives 32 counterbalanced blocks instead of 8, applied symmetrically to both arms — the remedy the cell itself prints. The gate is not weakened and the estimator is untouched. The bridge to the earlier levers stays job 343355's 16-repeat control row: 268.681 ms against lever 2's recorded 267.448 ms, 0.5 %. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…19x on numba CPU, A100 identity; phase 3 = 1.80x (#267) RAL job 343356 (gpu partition CPUs-only, 1 thread, 64 repeats, control = lever 2): route b memo-ON whole call 273.194 -> 230.031 ms; inversion.log_det_curvature_reg_matrix_term 40.849 -> 6.318 ms; curvature_reg_matrix n_calls 2 -> 1; all cell gates PASS; witness W1-W5 PASS with log det and log evidence bit-identical. Job 343355 (16 repeats) tripped the 1.03 instrumentation-overhead cap on the shorter call and is kept as the bridge row (control 268.681 ms vs lever 2's 267.448). RAL job 343357 (A100 fp64): identity; CPU-only lever. Cumulative levers 1+2+3 vs merge base: 413.3 -> 230.0 ms (1.80x). Note sections added to results/notes/fixed_lens_light_levers_2026_09.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… submits (#267) test_fixed_light_cell.py's single-arm contracts caught the lever submits through its glob: `^python3 -u` misses the indented subshell arms, lever 1 runs delaunay.py (no --mesh, its own config names, no cache by design — a verbatim copy of the adapt_split submit), and levers 2/3 wipe per-arm caches as JAX_CACHE_{CONTROL,FEATURE} rather than the single-arm string. Exclude the family there, as the library family already is, and give it test_fixed_light_numba_levers_submits.py: two arms, private checkouts on PYTHONPATH, provenance echoes, paired _control/feature config names, mesh and harvest prefix and per-arm cache wipe where the cell is fixed_light.py. No submit script changes: the recorded RAL runs depend on their text. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…#267) The lever-3 submit's header describes its provenance heredoc in prose (`$(cat <<'EOF' ...)` — the explanation for why it is not `read -r -d ''`), and the arm parser read that as a real `EOF` heredoc opener, swallowed the rest of the file and found zero `( ... )` arms. Skip comment lines when looking for an opener; the parser now finds two arms on all three levers. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…oth submit-family exclusions kept (#267) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Jammy2211
changed the base branch from
feature/fixed-light-numba-levers-l2
to
main
September 16, 2026 22:12
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
Lever 3 of #267, stacked on #271 (lever 2): the CPU A/B and A100 rows for PyAutoArray's shared-Cholesky log det of
F + λHand cachedcurvature_reg_matrix(library PR: PyAutoLabs/PyAutoArray#555), the five-pin witness, the deliberate handshake flip in the phase-1 accounting test, and the lever 3 section of the phase-3 verdict note.Verdict
Control = lever 2, feature = lever 3.
RAL job 343356 (CPU,
gpupartition CPUs-only, 1 thread, route b memo ON,--n-repeats 64= 32 counterbalanced ABBA blocks): whole call 273.194 → 230.031 ms, 1.188x (1.191x on medians, −43.163 ms);inversion.log_det_curvature_reg_matrix_term40.849 → 6.318 ms (6.47x on the site, 14.95 % of the call to 2.75 %);inversion.curvature_reg_matrix4.536 → 2.281 ms withn_calls2 → 1;solver.fnnls_cholesky— the row that must not move — 63.928 → 61.133 ms, −4.4 % against a 31–36 % clean spread withsolver_statsidentical in both arms. All four cell gates PASS in both arms, witness W1–W5 PASS with the fast and dense-forced log dets bit-identical (Δ exactly 0.0 nats against a 1e-10 gate), thefigure_of_meritbit-identical and thereconstructionbyte-identical, and both arms' productionlog_likelihoodbit-identical at 18665.014330695605. The only threegatesnumbers that move are log-det-derived at one ULP (+3e-12 and −5e-12 nats).Job 343355 ran the same A/B at 16 repeats: its control completed (268.681 ms, ABBA 1.0182 PASS — the bridge row, reproducing lever 2's recorded 267.448 ms to +0.46 %) and its feature arm measured 224.330 ms before tripping the harness's 1.03 instrumentation-overhead cap over 8 blocks and dying with no JSON. That cap's fixed cost does not shrink with the call (1.0147 at 413 ms → 1.0366 at 224 ms), so 64 repeats was applied symmetrically to both arms; the gate and the estimator are untouched. The bridge row's JSON+PNG are kept unversioned under
output/ral_job343355_16repeats/.RAL job 343357 (
fixed_light.pycell, A100 80GB PCIe, fp64, COMPLETED): identity.s3/rows["Log det Cholesky (F+λH reduced)"]1.125 → 1.139 ms; all sixlog_evidence_termsbit-identical in both systems; the eagerxp=npfamily — which does take the fast path — bit-identical too (log_evidence_eager29140.295876199474 in both arms, where lever 2's moved −3.4466e-06 nats); S0 log-det pins PASSED andpinned_driftempty in both. The A100's own dense potrf of the sameF + λHis 1.139 ms against 40.849 ms on one CPU core and 5.344 ms on lever 3's route, so CPU-only — and structurally so, since the JAX path never runsfnnlsand has no factor to read.Cumulative levers 1+2+3 vs merge base 413.3 ms: 413.301 → 230.031 ms, 1.797x (1.80x), 183.270 ms removed — a lower bound, since job 343356 re-measured lever 2's library 2.1 % slow and that applies to both of its arms.
Scripts Changed
hpc/batch_cpu/submit_breakdown_imaging_fixed_light_numba_levers_l3_delaunay_ral_hst_fp64— new: two-arm Leg D run, control lever 2 / feature lever 3 on privatePYTHONPATHcheckouts; in-job proof the arms differ by exactly lever 3 (log_det_from_passive_cholesky_fromand thefactorkeyword present only in the feature tree); witness in the feature arm.hpc/batch_gpu/submit_breakdown_imaging_fixed_light_numba_levers_l3_delaunay_a100_hst_fp64— new: two-armfixed_light.pyDelaunay cell on the A100, fp64.scripts/imaging/likelihood_breakdown/fixed_light_numba_levers_l3_witness.py— new: W1 fast path fires once and the factor covers k_active ≈ 1485 of 1500; W2 fast vs dense-forced log det; W3figure_of_merit≤ 1e-9 (bit-identical or the nats); W4curvature_reg_matrixsame object on repeat access and the fnnls solution byte-identical with/without the fast path; W5 same-fit timing.scripts/imaging/likelihood_breakdown/fixed_light_numba.py— theinversion.curvature_reg_matrixsite is now declaredcached=True(it became acached_propertyin lever 3).scripts/misc/test/test_fixed_light_numba.py—test_curvature_reg_matrix_is_recomputed_more_than_once→test_curvature_reg_matrix_is_cached, assertingn_calls == 1: the phase-1 handshake, flipped on purpose. This test fails against any PyAutoArray without lever 3, so this PR merges after feat(inversion): read log det(F + λH) off the NNLS Cholesky factor; cache curvature_reg_matrix (#267 lever 3) PyAutoArray#555 (library-first).results/breakdown/imaging/— 4 JSON + 4 PNG + witness JSON.results/notes/fixed_lens_light_levers_2026_09.md— lever 3 sections; the publishedF + λHandLog determinants + evidencegroup rows re-cut, sincelog_det_curvature_reg_matrix_termno longer owns a factorisation (the solve does).Cross-reference
Library change: PyAutoLabs/PyAutoArray#555 (
feature/fixed-light-numba-levers-l3@b4322c3e, stacked on #554). Merge order was #269 → #271 → this; superseded on 2026-09-16 by merging this PR alone againstmain(see Merge route below). Library: #553 → #554 → PyAutoLabs/PyAutoArray#555, all merged.Tracked by #267 (lever 3 of 3).
Heart gate
pyauto-heart readinesswas RED (score 20) at ship time with two release-chain reasons unrelated to this branch — "install verification FAILED (testpypi; checks F)" and "release validation FAILED (stage integrate)" — acknowledged by the human on 2026-09-16 for PR-open only (levers 2 and 3). Merge stays a human act via/prm.Merge route (2026-09-16, /prm)
This PR is now based on
mainand carries the whole phase-3 stack: the lever 1 commits of #269 (7c7968c,c899326), the lever 2 commits of #271 (289cea3,fd80eb9), the lever 3 commits above, plus three ship-side test commits and the merge ofmain(#270). #269 and #271 are closed as superseded, not merged, because thelintworkflow checks out PyAutoArraymain, which since PyAutoArray #555 merged (91240e43) already contains all three levers: the lever 1 / lever 2 copies ofscripts/misc/test/test_fixed_light_numba.pypin the pre-lever-3 library (curvature_reg_matrixrecomputed,patched()withoutfactor) and can never go green on their own again. Nothing in their diffs is lost — every commit lands through this PR.Ship-side fixes (no submit script changed; the recorded RAL runs depend on their text):
test_fixed_light_cell.pyexcludes the two-arm_fixed_light_numba_levers_submits from its single-arm contracts (as the library and trace families already are), andtest_fixed_light_numba_levers_submits.pyowns them: two subshell arms on private control/feature checkouts, provenance echoes, paired_control/feature config names,--mesh+ harvest prefix + per-arm cache wipe where the cell isfixed_light.py, the adapt_split provenance where it isdelaunay.py(lever 1).main(research: trace-based one-process decomposition of the certified Delaunay GPU call (residue phase 1, #268) #270 trace legs) resolved in that same_submits()filter: all three family exclusions kept.🤖 Generated with Claude Code