Skip to content

feat: campaign collector, digest, propose-only resubmits and retro mode (hpc-campaign p2b) - #1742

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/hpc-campaign-p2b-collector-retro
Oct 30, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/hpc-campaign-p2b-collector-retro

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

PR 2b of hpc-campaign phase 2 (#1740). Stacked on #1741; merge that first.

  • Collector (collector.py): one sacct call joined with the fits' status records, matched by the job and task ids each fit recorded. The scheduler decides timeout/oom/node_fail/cancelled; otherwise the status record gives the state and failure class. It also runs the stage success checks and reports manifest objects that were never submitted.
  • Digest (digest.py):
    • digest.json holds the full summary; digest.md is at most 2 KB; tasks.jsonl has one row per task; failures go in failed_<class>.txt.
    • It reports per-stage counts, p50/p95/max wall time and RSS against the request, CPU efficiency, and CPU-hours split into successful vs failed or repeated, plus disk, ETA and drift flags.
  • Proposals (proposals.py), propose-only per ruling F5:
    • timeout → p95 + 25 %; OOM → peak × 1.5; both capped by the site, and the retry maximum is respected;
    • Python failures are never resubmitted;
    • a task that already ran to the partition's maximum time is told to resume from its checkpoint instead.
    • A human acts on a proposal with submit --proposal <file>.
  • Retrospective mode (retro.py): builds the same digest from a sacct --parsable2 dump alone. Tasks are selected by WorkDir prefix and job-name regex, plus an --other-stage bucket.
  • CLI: status, resubmit, retro, submit --proposal.

Witness W2 (ruling F4a, read-only, no compute)

retro over the DR1 sacct dump: 67k rows in 13 s → 61,078 Slurm tasks.

  • Outcomes: 56,738 completed, 3,254 timeout, 550 failed (unrecorded, from before status records existed), 524 cancelled, 12 node_fail, 0 OOM.
  • CPU-hours: 709.8k allocated, 505.9k of it in tasks that completed (so 29 % went on failed or repeated work).
  • Memory: p95 peak use was 2–4× below the request in every stage.
  • The 2026-09-30 incident is visible: 568 CPU-only tasks ran on gpu.

Digest and figures are in Workspace/Science/scratch/hpc_campaign_p2_w2/, which is never committed. Counts are per Slurm task, not per lens.

Decisions taken (please check)

  1. cancelled/requeued/preempted stay campaign-level strings; states.py is unchanged (results-library owns its edits in this window). A failure with no status record is classed unrecorded. A possible follow-up is RunState.CANCELLED.
  2. Only digest.md is capped at 2 KB; the JSON carries the full summary.
  3. autofit.campaign does not re-export submit/retro functions (they'd shadow the submodules); import them from the submodules.

Test plan

  • test_autofit/campaign (106): an end-to-end FakeScheduler run with injected timeout, OOM, exception and missing-seed tasks giving the right classes, lists and proposals; the digest size cap; a synthetic sacct retro.
  • Full PyAutoFit suite (see comment).

Refs #1740

🤖 Generated with Claude Code

…ective sacct mode (hpc-campaign p2b, #1740)

autofit.campaign.collector joins the job ledger's accounting (one sacct call, attempts
kept) with the fits' status records (by the job/task ids each fit recorded): the
scheduler decides timeout/oom/node_fail/cancelled, the status record the state and
failure class otherwise; stage success checks (zip with .completed + members);
unsubmitted manifest objects reported. autofit.campaign.digest writes digest.json, a
<=2 KB digest.md, tasks.jsonl and failed_<class>.txt: per-stage counts, p50/p95/max wall
and RSS vs request, CPU efficiency, CPU-hours split successful vs failed or repeated,
disk, ETA, drift flags (timeouts, memory tight/slack, CPU efficiency, CPU-only tasks on
a GPU partition, success check). autofit.campaign.proposals sizes resubmits from the
failed tasks' own measurements (timeout p95+25 %, OOM peak x1.5, capped by the site,
retry max honoured, Python failures never resubmitted) and pending-task scontrol
updates; nothing is ever submitted by a proposal. autofit.campaign.retro builds the
same digest from a sacct --parsable2 dump alone (WorkDir path-boundary and job-name
selection, stage from job name, period, peak concurrency). CLI: status, resubmit,
retro, submit --proposal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211

Copy link
Copy Markdown
Collaborator Author

Full PyAutoFit suite (PyAuto313, local): 2a 4,082 passed / 2b 4,098 passed (2 skipped, 1 xfailed). Smoke autofit (scripts + notebooks) green on the 2b head. Heart STALE (release validation only) acknowledged by the human for this ship.

Base automatically changed from feature/hpc-campaign-p2-campaign-core to main October 30, 2026 13:42
@Jammy2211
Jammy2211 merged commit 7d0fe9d into main Oct 30, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/hpc-campaign-p2b-collector-retro branch October 30, 2026 13:43
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