Skip to content

chore: scrap the retired inference programme (Gut-archived) — autolens-inference phase 2 #245

Closed

Description

@Jammy2211

Overview

The retired Cortex project inference_programme (PyAutoCortex#22) still lives on this repo's main. The human ruled on 2026-09-10 that none of it is trusted or inherited by the successor repo autolens_inference. This task materialises the pre-deletion tree as a durable PyAutoGut archive ref, deletes the searches framework, sampler leaves, result rows, InferenceRefs_v1 baselines, inference/gradient-slam notes and 58 search submits, repairs every consumer (README renderer, lint/profile workflows, wall gate, docs), repoints the Brain samplers faculty's mature tier at autolens_inference, and closes the residue issues (#218, #205; #166 reframed). Phase 2 of the autolens-inference epic (phase 1: PyAutoLabs/PyAutoMind#399).

Plan

Detailed implementation plan

Affected Repositories

  • autolens_profiling (primary)
  • PyAutoBrain
  • PyAutoMind (ledger only, no worktree)
  • PyAutoGut (attic remote only, no file edits)

Work Classification

Workspace.

Branch Survey

Repository Current Branch Dirty?
./autolens_profiling main clean — parallel claim beside reconstruction-row-split (disjoint files)
./PyAutoBrain main clean
./PyAutoMind main clean — ledger edits via detached temp worktree

Suggested branch: feature/scrap-inference-programme
Worktree root: ~/Code/PyAutoLabs-wt/scrap-inference-programme/

Implementation Steps

Scope of the deletion (measured on main today)

Path set Tracked files
scripts/misc/searches/ (framework: _runner/_setup/_samplers/_targets/_metrics/_per_lane/_recovery, sweep, aggregate, bijector_ab, slogdet_ab*, clipper_campaign, positions_transects, restamp_target_block, README) 19
scripts/<dataset_class>/searches/** (thin sampler leaves) 67
results/searches/** 324
results/baselines/InferenceRefs_v1/** 33
results/notes/inference/** 60
results/notes/gradient_slam/LEDGER.md 1
CORTEX.md 1
hpc/batch_{gpu,cpu}/submit_* whose name contains search, nautilus, nss, nuts, smc, multi_start, prodigy, positions, bijector, slogdet, clipper, phase8b, mass_pix (+ their .tail twins) 58 of 127
scripts/misc/test/test_searches_*.py (8 files) 8

Keep: _production_config.py, _adapt_image_util.py, instruments/, simulators/,
likelihood_runtime, likelihood_breakdown, hazards, vram, wall, lens/,
quick_update, parallel_scaling, pipeline_resume, delaunay_nn, nnls_warm_start,
results/notes/* other than the two dirs above, the non-search submits, and
scripts/misc/test/test_wall_check_submits.py (edit, do not delete).

Steps

A. Issue + registration (judgment tier, in-session)

  1. /create_issue on the prompt → issue in autolens_profiling, title
    chore: scrap the retired inference programme (Gut-archived) — autolens-inference phase 2,
    branch above, worktree root above, classification workspace; skip its active.md step.
  2. Register in active.md (status workspace-dev, parallel-claim: reconstruction-row-split (autolens_profiling),
    repos autolens_profiling + PyAutoBrain) via the temp-worktree push; then /start_workspace
    (worktree for autolens_profiling and PyAutoBrain).

B. Archive first (Opus subagent, inside the profiling worktree)

  1. cd <wt>/autolens_profiling && git fetch origin; SHA=$(git rev-parse origin/main);
    PYAUTO_GUT_REMOTE=https://github.com/PyAutoLabs/PyAutoGut.git ../../PyAutoGut/bin/pyauto-gut archive $SHA autolens-profiling/inference-programme
    (bin/pyauto-gut:27 defaults the remote to origin — the env var is mandatory or the
    ref lands on profiling's own remote). Verify with
    git ls-remote https://github.com/PyAutoLabs/PyAutoGut.git refs/heads/archive/condemned/autolens-profiling/inference-programme
    and pyauto-gut list. Record $SHA for condemned.md.

C. Delete + repair consumers (same subagent)

  1. git rm -r -q the path sets in the table (enumerate with git ls-files | grep -E …
    and the submit-name regex; list the count per set in the report).
  2. Repair every consumer (git grep -l -E "misc/searches|results/searches|notes/inference|InferenceRefs|gradient_slam|searches\." -- . must come back empty except deliberate history mentions in AGENTS.md/README.md):
    • scripts/misc/tooling/build_readme.py: drop the searches section renderer, its
      searches._metrics import, and the scripts/misc/searches/README.md target; keep
      --check. Remove the <!-- BEGIN auto-table:searches --> region from README.md.
    • .github/workflows/lint.yml: drop the two searches smoke lines (:145-146) and the
      searches sentence in the header comment (:6); wall/check_submits.py comment (:97).
    • .github/workflows/profile.yml: drop the searches section (:134-147), the
      sections input text, and the results/searches / scripts/misc/searches/README.md
      entries in the commit step (:163-169). .github/workflows/README.md prose.
    • scripts/misc/wall/rates.py + check_submits.py: remove STEP_RATE/PROVENANCE
      rows that only served search cells, and any submit-name rules for the deleted set;
      scripts/misc/test/test_wall_check_submits.py fixtures that reference deleted submits.
    • Non-search submits that mention searches in comments
      (submit_imaging_{delaunay,mge,pixelization}_a100_hst_fp64): edit the comment only.
    • AGENTS.md, README.md, hpc/README.md, .gitignore: remove the searches tier from
      the layout/testing prose; add one line: "science runs are the Cortex's; inference
      benchmarking lives in autolens_inference; the retired programme's tree is Gut ref
      archive/condemned/autolens-profiling/inference-programme @ <SHA>". Delete
      CORTEX.md. Keep the two repos_sync:* blocks untouched.
    • .claude/skills/profile_likelihood / skills/profile_likelihood: only if they name
      searches (grep said no).
  3. Regenerate: python scripts/misc/tooling/build_readme.py then --check; ruff check .,
    ruff format --check ., python scripts/misc/wall/check_submits.py --check,
    pytest scripts/misc/test -q, and the lint smoke list under AUTOLENS_PROFILING_SMOKE=1.

D. Brain (same subagent, in the Brain worktree)

  1. PyAutoBrain/agents/faculties/samplers/_samplers.py:91-94,162-170: the mature tier
    walked autolens_profiling/scripts/<dataset>/searches/<sampler>/<model>.py. Point
    SURFACE_PROFILING-derived mature-tier discovery at autolens_inference (same glob;
    it is empty until phase 3 and must degrade to an empty list, not an error) and rename
    TIER_LENS_MATURE to mature (autolens_inference searches cells); update the three
    prose lines in agents/faculties/samplers/AGENTS.md:116-153. Run
    pytest tests -q -k samplers then the full Brain suite.

E. Mind ledger (judgment tier, temp worktree → origin/main)

  1. condemned.md: one ## autolens-profiling/inference-programme entry per the "Entry
    schema" — type: file, locator: autolens_profiling/{scripts/misc/searches, scripts/*/searches, results/searches, results/baselines/InferenceRefs_v1, results/notes/{inference,gradient_slam}, CORTEX.md, 58 search submits},
    confidence: 0.99, reason: the human's ruling (quoted), merged: yes (committed
    deletion — bytes live in remote history), condemned: 2026-09-10,
    sweep-after: 2026-12-10, breaks-if-wrong: the InferenceRefs_v1 baselines and the
    programme ledger, archive-ref: refs/heads/archive/condemned/autolens-profiling/inference-programme @ <SHA>.
    git rm draft/feature/autolens_profiling/gradient_slam_mass_pix_target.md.
  2. Issues: close autolens_profiling#218 (superseded by autolens_inference phase 3) and
    Sweep the RAL active output/ tree: move point-source, Cluster and image/source-plane results to output/legacy_point/ (mesh refs stay) #205 (tree stashed 2026-09-07) with a one-paragraph comment each; retitle Decide the default log_det_method in PyAutoArray (slogdet vs cholesky, cost-aware) #166 to
    Make slogdet the standard log_det_method in PyAutoArray and edit its body to drop the
    gradient-slam framing (gh issue edit).

F. Ship + close (judgment tier)

  1. /ship_workspace (PR body pre-drafted; ## Scripts Changed lists the deleted sets by
    count and the repaired consumers) for autolens_profiling, plus a small Brain PR;
    /prm when green; the record carries the Gut ref SHA.

Key Files

  • autolens_profiling/scripts/misc/tooling/build_readme.py, .github/workflows/{lint,profile}.yml, scripts/misc/wall/{rates,check_submits}.py, AGENTS.md, README.md, hpc/README.md
  • PyAutoBrain/agents/faculties/samplers/{_samplers.py,AGENTS.md}
  • PyAutoMind/condemned.md
  • PyAutoGut/bin/pyauto-gut (archive verb; PYAUTO_GUT_REMOTE)

Original Prompt

Click to expand starting prompt

Scrap the retired inference programme from autolens_profiling (autolens-inference phase 2)

Type: maintenance
Target: autolens_profiling
Repos:

  • autolens_profiling
  • PyAutoMind
  • PyAutoGut
    Themes:
  • inference
  • hygiene
  • gut
    Difficulty: medium
    Autonomy: supervised
    Priority: high
    Epic: autolens-inference
    Phase: 2
    Status: draft
    Consequence: judge
    Witness: git -C autolens_profiling ls-files | grep -c "scripts/misc/searches\|scripts/[a-z_]*/searches\|results/searches\|results/baselines/InferenceRefs_v1\|results/notes/inference\|results/notes/gradient_slam" prints 0 on the branch; git ls-remote PyAutoGut refs/heads/archive/condemned/autolens-profiling/inference-programme resolves; autolens_profiling lint is green; autolens_profiling#218 and Sweep the RAL active output/ tree: move point-source, Cluster and image/source-plane results to output/legacy_point/ (mesh refs stay) #205 are closed
    Review-minutes: 25
    Unattended: ready
    Filed: 2026-09-10

The human retired the Cortex project inference_programme on 2026-09-07 (PyAutoCortex#22)
and on 2026-09-10 ruled that none of its material is trusted or inherited by the
successor repo autolens_inference ("I dont trust a lot of this, some runs were dodgy,
so just scrap it and move it somewhere not in autolens_inference"). This phase moves that
material out of autolens_profiling into the Gut's attic and deletes it from main, so
profiling becomes what its repos.yaml role says: likelihood timing only.

What goes to the attic (one archive ref, then deleted from main)

Survey first — git ls-files plus a grep for searches / inference / InferenceRefs /
gradient_slam across the repo — and list every path before deleting. Expected set:

  • scripts/misc/searches/ (the 13.8k-line searches framework: _runner.py, _setup.py,
    _samplers.py, _targets.py, _metrics.py, _per_lane.py, _recovery.py,
    sweep.py, aggregate.py, bijector_ab.py, slogdet_ab*.py, clipper_campaign.py,
    positions_transects.py, restamp_target_block.py, its README and tests)
  • scripts/<dataset_class>/searches/** (the ~60 thin sampler leaves)
  • results/searches/** (177 result JSON/PNG rows), results/baselines/InferenceRefs_v1/**
  • results/notes/inference/** (PROGRAMME.md, DECISIONS.md, LITERATURE.md, methods/,
    targets/, phase_*/), results/notes/gradient_slam/**
  • hpc/batch_gpu/submit_* and hpc/batch_cpu/submit_* that drive searches
    (nautilus, nss, nuts, smc, multi_start, prodigy, positions, bijector,
    slogdet, clipper in the name); keep the likelihood-runtime / breakdown /
    parallel-scaling submits
  • CORTEX.md (it only explained which of three ledgers counted) — replace with one
    line in AGENTS.md: science runs are the Cortex's, and this repo has no project row
  • scripts/misc/test/test_hazards_* only if they import from searches; keep the
    compile-pin tests

Not in scope: _production_config.py, instruments/, simulators/, likelihood_runtime,
likelihood_breakdown, hazards, vram, wall, lens/ — those are profiling's own.
The RAL run outputs are already stashed at
/mnt/ral/jnightin/inference_programme_retired_2026-09-07 and are not touched.

Mechanics

  1. @autolens_profiling: on the task branch, git rm -r the set above; then fix every
    consumer: scripts/misc/tooling/build_readme.py (drop the searches section
    renderer and its sentinel regions in README.md + scripts/misc/searches/README.md),
    .github/workflows/lint.yml (the smoke list names searches/nautilus/mge.py) and
    profile.yml (sections input), scripts/misc/wall/rates.py + check_submits.py
    (rows that only served search submits), AGENTS.md / README.md prose, the
    .claude/skills/profile_likelihood skill if it mentions searches. Regenerate the
    README with build_readme.py; ruff, build_readme.py --check,
    check_submits.py --check, pytest must pass.
  2. @PyAutoGut + @PyAutoMind: BEFORE the deletion commit is merged, materialise the
    pre-deletion tree as a durable ref: pyauto-gut archive (read PyAutoGut/README.md
    and PyAutoBrain/skills/hygiene for the verb) pushing
    refs/heads/archive/condemned/autolens-profiling/inference-programme to PyAutoGut —
    verify with git ls-remote on the Gut remote, not origin (memory: the archive
    verb pushes to origin unless PYAUTO_GUT_REMOTE is set). Add the entry to
    PyAutoMind/condemned.md per its "Entry schema" (what, why, ref, recover-by, void-after).
  3. Issues: close autolens_profiling#218 (gradient-slam mass_pix dev leg — superseded by
    autolens_inference phase 3) and Sweep the RAL active output/ tree: move point-source, Cluster and image/source-plane results to output/legacy_point/ (mesh refs stay) #205 (RAL legacy_point sweep — the tree was stashed on
    2026-09-07). Leave Decide the default log_det_method in PyAutoArray (slogdet vs cholesky, cost-aware) #166 (slogdet as PyAutoArray default) open but edit its title/body
    to drop the "gradient-slam-baseline phase 23" framing: it is a library question, not
    epic residue. Delete PyAutoMind/draft/feature/autolens_profiling/gradient_slam_*.md
    and remove the archived epic entry's forward pointer if complete/archive/epics/
    names a live successor.
  4. PyAutoCortex: nothing — the inference_programme row is already status: retired;
    do not delete rows (rulings cite them).

Original request (verbatim, 2026-09-10)

"I dont trust a lot of this, some runs were dodgy, so just scrap it and move it somewhere
not in autolens_inference: What still stands and should be carried in verbatim: the 9
certified InferenceRefs_v1 baselines, the MGE Prodigy result (5/5 hits at 163–297 s vs
Nautilus 939 s), the positions binding rule, the target_id hashing, the schema-v2 run
JSON, and the tolerance table (2 nats, 0.2σ, σ-ratio in [0.8, 1.25]). Also the
13.8k-line searches framework under autolens_profiling/scripts/misc/searches/, which is
the runner this repo needs."

🤖 Generated with Claude Code

https://claude.ai/code/session_01S3mSjckpJgKufHFTYVmjmC

Activity

  1. Jammy2211 commented on Sep 11, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    The retired inference programme is gone from autolens_profiling, and the
    samplers mature tier now points at autolens_inference. Phase 2 of the
    autolens-inference epic.

    PRs merged

    What went
    The searches framework and its leaves, results/searches, the
    InferenceRefs_v1 baselines, notes/inference + notes/gradient_slam,
    CORTEX.md, 58 search submit scripts and 8 search tests — 555 files. The
    build_readme / lint / profile / wall / docs paths were repaired around the
    hole, and lint is green on the merged head.

    Nothing was destroyed. origin/main as it stood before the deletion is held
    by PyAutoGut as a durable, recoverable ref:

    refs/heads/archive/condemned/autolens-profiling/inference-programme  @  c8b60580
    

    Anything in the scrapped tier is git fetch-able from there; nothing needs to
    be restored to read it.

    Issues

    Deliberately left as a follow-up
    scripts/misc/jax_compile/probe.py built its cells through
    searches._setup.build_for_cell, which went with the tier; build_objective
    now raises NotImplementedError naming the archive ref. Its pinned
    warm-compile records and the compile dashboard are intact. Filed as
    PyAutoMind/draft/maintenance/autolens_profiling/jax_compile_probe_needs_own_cell_builder.md
    — give the probe a builder this repo owns; do not restore anything from the ref.

    Closing as completed.

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