Skip to content

feat: campaign evidence readers, evidence-graded plan and pilot (hpc-campaign p3) - #1747

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/hpc-campaign-p3-plan-evidence
Oct 30, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/hpc-campaign-p3-plan-evidence

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

hpc-campaign phase 3 (#1745, epic ledger draft/research/autofit/hpc_campaign_epic.md). It adds planning before submission, in autofit/campaign/ only:

  • evidence.py: readers for profiling-summary@3, walltime-validation@1 and inference-summary@2, by path or URL. A stage declares opaque match keys under evidence: in campaign.yaml.
    • Evidence grades on every number: measured-current / provisional / analogue (naming the key that differs) / superseded / estimated / unsupported.
    • A record is measured-current only on exact keys. A profiling record also needs a current, not-superseded Pulse designation for its own keys and setup.
    • "optimal" is never written without such a designation, and none exists today.
  • plan.py: python -m autofit.campaign plan writes plan.md + plan.json. It proposes CPUs, memory, wall time, throttle, ETA and disk from a pilot digest and/or the evidence. Every number is graded and carries its record ids, and a test walks plan.json to enforce that.
  • pilot.py: campaign pilot writes a stratified 1–2% pilot.json, with the submit --indices command left unrun. Nothing is submitted.

Heart RED override (development only)

Heart was RED at the start of this task (2026-10-30): release validation FAILED (stage integrate); PyAutoHeart/workflows/Release Integrate failure; PyAutoNerves test_fitsable.py::test__output_to_fits red; unit-test timing 1 regression (>3× baseline), 14 slow; autogalaxy red; release validation NOT release_ready (v2026.10.30.1.dev85101); autolens_profiling red; worktree drift 1 dirty. The human authorized the Human override for Heart RED (development only) live for hpc-campaign phases 3 and 4 ("Override, proceed"). This PR does not touch any RED item and does not fix Heart. Merging still needs green CI and a separate /prm; it permits no release.

Decisions taken (please check)

  1. CPU right-sizing: below a median CPU efficiency of 0.6, the plan uses the largest power of two not above the CPUs actually used. Wall times measured at a different core count are scaled by measured/requested cores, graded estimated, and flagged cores_mismatch.
  2. Memory: the pilot's maximum RSS × 1.25, rounded to 4 GB steps. Wall time: p95 + 25% (timeouts counted at their limit), in 15-minute steps, flagged censored when the p95 reaches the timeout limit, and split by size bin when a size_field is given.
  3. When several records match: the largest value among those with the best grade wins, ordered deterministically. All contributing ids and the spread are recorded.
  4. Pilot numbers, including the previous DR1 run used as a pilot, are graded estimated (pilot), never measured-current.
  5. Throttle is 50% of the stated idle CPUs (given offline with --idle-cpus). ETA is labelled an upper bound, with stages run one after another.

Test plan

  • test_autofit/campaign: 128 pass (22 new), including the DR1 repack reproduced from a sacct fixture (CPUs 4/8/8 exact; memory within one 4 GB step: vis_pix 16 and SED 8 GB exact, vis_lp 8 vs 12 GB) and the grade matrix.
  • Full PyAutoFit suite: 4,120 passed (local, PyAuto313). Smoke test on the autofit workspace: 10 passed, 0 failed.
  • Independent review: FINDINGS. The fix commit 32a9305 addresses:
    • cores mismatch;
    • first-match-wins evidence choice;
    • the cost-per-evaluation fallback;
    • ungraded pilot and size-bin numbers;
    • the designation scope check.
  • Witness W3: a graded 5,000-lens Euclid VIS plan in Workspace/Science/scratch/hpc_campaign_p3_w3/ (not committed).
    • vis_lp 4 CPUs / 8 GB / 5:00; vis_pix 8 CPUs / 20 GB / 10:45; SED 2 CPUs / 8 GB / 4:00 (censored, so the pilot must run at a longer limit).
    • ≈108k CPU-h, ETA ≤ 63.5 h.
    • Grades: 0 measured-current, because there are no Euclid walltime or inference records yet. The evidence gaps are listed in its README for the likelihood-lifecycle ledger.

Refs #1745

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits October 30, 2026 14:43
… (hpc-campaign p3)

autofit.campaign.evidence reads profiling-summary@3 (or the PyAutoPulse
snapshot wrapping it), walltime-validation@1 and inference-summary@2 by path
or URL; stages declare opaque match keys under evidence.keys in
campaign.yaml. Every match is graded measured-current / provisional /
analogue (instrument or regime differs, said which) / superseded; a stage
with no keys matches nothing. 'Optimal' comes only from a PyAutoPulse
designation decision (decisions.yaml kind: designation); Pulse's
provisional_optimal marker is restated without the word.

autofit.campaign.plan proposes per stage CPUs (shrunk to a power of two
below 60 % median CPU efficiency), memory (peak RSS x 1.25, 4 GB steps),
wall time (p95 + 25 % per size bin, 15 min steps, capped at max_time;
timeouts kept at their limit and a censored p95 flagged), throttle (50 % of
idle CPUs), ETA, disk and an energy placeholder for phase 4 — every number a
graded value with its sources; plan.json + plan.md. autofit.campaign.pilot
writes a stratified pilot.json (never submitted). CLI: plan, pilot.

Refs #1745

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce choice, cost fallback, graded pilot numbers

1. A walltime-validation record measured on N cores is scaled by N/cpus for
   a task of cpus CPUs (perfect scaling, optimistic when fewer), graded
   estimated with a cores_mismatch limitation shown as a plan.md flag;
   CPU-hours come from measured core-seconds, not scaled wall x cpus.
2. Stage wall time and host memory take the largest value among the
   matching records of the best grade (ordered by id, so file order no
   longer decides), listing every contributing id and the spread.
3. The evaluations x cost scaling falls back to the per-call cost when the
   walltime record's implied cost per evaluation is null.
4. Pilot statistics and size bins sit under graded wrappers (estimated,
   pilot); size bins carry a censored flag like the pilot's p95.
Also: a profiling record is measured-current only when its decision is the
current, unsuperseded designation covering the record's own keys and names
its setup.

Refs #1745

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant