Skip to content

feat: rectangular 28² (production preset) runtime rows for the inference links #468

Closed

Description

@Jammy2211

Overview

The SLaM inference runs use the rectangular production preset 28×28 (784 px) while profiling's standard is 35² (1225 px), so every rectangular Profiling runtime link on the Pulse inference table compares different likelihood sizes. Add 28² rows (a size variant beside the standard) for the four hst rectangular setups the inference runs use, measured on 2026.10.25.1, and refresh the inference join.

Tier: judge — merge mode: human /prm. Heart RED override: live human 2026-10-26 "I approve of the override" (this task, incl. RAL jobs).

Original Prompt

Click to expand

Profile rectangular imaging at 28² (the production preset) so inference rows link like-for-like

Type: feature
Target: autolens_profiling
Repos:

  • autolens_profiling
    Difficulty: small
    Autonomy: supervised
    Priority: medium
    Epic: likelihood-lifecycle
    Status: formalised
    Consequence: judge
    Witness: every rectangular imaging setup that has an inference wall-time record (hst; numba_cpu_sparse, jax_cpu_sparse, jax_cpu_dense, jax_gpu_sparse, jax_gpu_dense on their host classes; default + light_fixed variants where inference ran) has a current 28x28 runtime row on pin 2026.10.25.1, and the autolens_inference exporter's size_match is true for those rows
    Filed: 2026-10-26

Request

HUMAN 2026-10-26, choosing "Profile 28² too": the SLaM inference runs use the rectangular production preset 28x28
(784 px, mesh_shape) while the profiling standard size is 35x35 (1225 px, human size rule 2026-10-23), so the
inference table's "Profiling runtime" link compares different likelihood sizes (autolens_inference#47:
size_match false on every rectangular match). Add 28² rectangular runtime rows (a size variant beside the
standard, not replacing it — the 35² standard stays the coverage cell) for the setups/instruments that have
inference records, measured on RAL at pin 2026.10.25.1 (private checkout /mnt/ral/jnightin/profiling/PyAuto_2026.10.25.1),
and make the exporter prefer the exact-size current record (#47 already tie-breaks on size_match).
Delaunay needs nothing: runs use 1250 = profiling standard.

Plan (approved in chat "go", 2026-10-26)

  1. RAL: verify /mnt/ral/jnightin/profiling/PyAuto_2026.10.25.1 has all 5 libs at tag 2026.10.25.1 (fill Lens from the shared mirror if its GitHub clone failed); 28² submits point at it — first rows measured ON 2026.10.25.1.
  2. Generator: declared 28² size-variant batch in scripts/misc/campaigns (imaging_p2a.py or a sibling): hst rectangular runtime + breakdown legs for numba_cpu_sparse@hpc_ral_cpu, jax_cpu_sparse@hpc_a100, jax_gpu_sparse@hpc_a100, jax_gpu_dense@hpc_a100 with --source-pixels 784; numba + jax_cpu_sparse legs → RAL CPU array (--partition=ral only), GPU legs → one A100 --gres job (8 legs, ~20 min on 2a walls).
  3. Submit (human go given with this approval), pull, commit as current rows in regime source_pixels_784 beside the 35² standard; regenerate catalogue → dashboard → coverage (coverage stays standard-only).
  4. autolens_inference: refresh catalogue/pulse_lens_runtime_reference.json so the exact-size tie-break picks the 784 rows (size_match true for default rectangular runs).
    Out of scope: jax_cpu_dense (no profiling setup), light_fixed (no profiling cells at any size).
    Heart RED override: live human 2026-10-26 "I approve of the override" for this task (incl. its RAL jobs).

Activity

  1. Jammy2211 commented on Oct 26, 2026

    @Jammy2211
    ContributorAuthor

    Scope addition (human, 2026-10-26): PyAutoPulse rejects a second current record that differs only by regime (its one-current key omits it), so a current source_pixels_784 row beside the 35² standard fails validation. The human chose "Yes, small Pulse PR first" (option text: "Same RED override extended to it. Ships before the profiling rows."). Order: PyAutoPulse (regime in the one-current key) → these profiling rows → autolens_inference join refresh.

  2. Jammy2211 commented on Oct 26, 2026

    @Jammy2211
    ContributorAuthor

    Matrix-free interferometer route — profiling pickup note (phase 5b of PyAutoArray#638)

    The matrix-free inversion is on PyAutoArray main as of 2026-10-26 (PyAutoArray#658, pending release; PyAutoGalaxy#670 tests). It is opt-in and reachable from any FitInterferometer / likelihood function with no other code change:

    settings = al.Settings(
        interferometer_route="matrix_free",   # new; None/"fft"/"numba" unchanged
        use_positive_only_solver=True,        # interior point + active-set polish
        use_edge_zeroed_pixels=False,         # REQUIRED with positive-only on this route (raises otherwise)
    )
    pixelization = al.Pixelization(
        mesh=al.mesh.RectangularUniform(shape=(n, n)),   # only RectangularUniform
        regularization=al.reg.MaternSparse(coefficient=..., scale=...),  # only MaternSparse
    )
    # dataset after dataset.apply_sparse_operator(use_jax=False)  -- NumPy backend only

    Constraints (the class raises InversionException on each): JAX backend; linear light profiles / func lists; more than one mapper; non-rectangular mesh; any regularization other than MaternSparse; positive-only with edge-zeroing; dataset without a sparse operator. Over-sampling and a primary beam are supported. reconstruction_noise_map / curvature_matrix / curvature_reg_matrix are unavailable (raise); the fit visualizer skips the noise-map panel.

    What to measure (dense "fft" route vs "matrix_free", unconstrained and positive-only), the 5b deliverable from the phase-5 draft:

    • wall time per likelihood call and peak RSS at 50², 64², 128², 192² mesh pixels, on one synthetic and one real interferometer dataset;
    • log_evidence difference: the only approximate term is ln det(F+H) by stochastic Lanczos quadrature (10 probes, 40 steps, fixed seed; 0.10% of dense on the test case, documented bound 0.5%). Report the per-probe spread when W~ is far from diagonal (few visibilities, broad fringes), where it degrades;
    • PCG iteration counts (inversion.pcg_rtol=1e-10, pcg_maxiter=5000; a non-converged solve raises) and interior-point steps (inversion.positive_result).

    Diagnostics on the inversion: inversion.operator (sparse M, curvature_matvec), regularization_matrix_sparse, positive_result. The dense route cannot run above ~100²; a matrix-free-only row there is expected, not a failure.

    Decision rule the note should produce for the assistant: the mesh size (and visibility count) above which matrix_free beats fft on time and memory, and whether the SLQ evidence error is below the sampler's resolution there. Workspace example (5c) is dropped until this verdict; the Settings docs in autoarray/settings.py are the only user-facing text.

  3. Jammy2211 commented on Oct 26, 2026

    @Jammy2211
    ContributorAuthor

    Pulse leg shipped → PyAutoLabs/PyAutoPulse#80 (regime joins the @3 one-current key; must merge BEFORE the profiling rows PR). Heart RED override (development only): live human 2026-10-26 "I approve of the override" for this task, extended to the Pulse PR via the chosen option "Yes, small Pulse PR first" ("Same RED override extended to it."). RED reasons as recorded on PyAutoPulse#80 (release validation FAILED stage integrate; Release Integrate / Workspace Smoke failure; autolens, PyAutoBrain, PyAutoLens, autolens_profiling red; …). Gates: ruff, pytest 369, check --offline, producer --validate-with OK, independent review CLEAN. No release; merge needs a fresh /prm + green CI.

  4. Jammy2211 commented on Oct 26, 2026

    @Jammy2211
    ContributorAuthor

    Pulse leg merged via /prm: PyAutoPulse#80 → main 5474e3cb (regime joins the @3 one-current key). A current source_pixels_784 row can now coexist with the 35² standard. Task stays open: RAL 28² batch → profiling rows PR → inference join refresh.

  5. Jammy2211 commented on Oct 27, 2026

    @Jammy2211
    ContributorAuthor

    Profiling leg shipped: PR #470. RAL 413044 + 413046 ran 8/8 legs on pin 2026.10.25.1, and the 4 hst rectangular 28x28 cells are ingested as current source_pixels_784 rows (Pulse validation passes via PyAutoPulse#80). Remaining: the size_match refresh in the autolens_inference exporter. The witness also lists jax_cpu_dense and light_fixed variants, which this batch did not measure (noted in the PR).

  6. added a commit that references this issue on Oct 27, 2026
  7. Jammy2211 commented on Oct 27, 2026

    @Jammy2211
    ContributorAuthor

    PR #470 merged (a1a4ccf): the 28x28 rows are on main. This issue stays open for the autolens_inference size_match refresh. The witness gap (jax_cpu_dense and light_fixed variants unmeasured) is still open.

  8. Jammy2211 commented on Oct 29, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    All three PRs for this task are merged:

    Declared limitation, out of scope under the approved plan. 24 inference records stay unpaired by design:

    • jax_cpu_dense (12): there is no profiling setup for it.
    • light_fixed (7): there are no profiling cells at any size.
    • source_lp[1] (5): this stage is parametric, with no inversion.

    Follow-up (cosmetic, not fixed here): the README version column in autolens_profiling shows v2026.8.17.1 on the source_pixels_784 rows, but they were measured on pin 2026.10.25.1. The rows' revision SHAs carry the real provenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions