Repository navigation
Sweeps as throttled Slurm job arrays; the contract's GPU ceiling paces them - #324
Conversation
…s them A launch with --array N is one job array (--array=0-N%K): the queue holds one entry per sweep, Slurm runs at most K tasks at once, and the wake's afterany on the array id covers every task. The task derives its job dir (eval-launch-<name>.<k>) and SWEEP_INDEX from SLURM_ARRAY_TASK_ID inside the one script; write_eval_job creates and clears the task dirs. The author sets the pace with launch --concurrency K; clamp_concurrency applies the contract's budgets.max_concurrent_gpus as a GPU-counted ceiling (K = ceiling // gpus, never below one), before the launcher and the park record it, and the wake text says the pace. Job ids gain the task form <id>_<k>: SlurmCompute.status combines an array's per-task sacct lines, launch_task_ids expands one id per launch for states and refunds (a park recorded before arrays passes through), the ledger keeps the array id and the queue view maps tasks and pending ranges back to it, reading K off the range. LocalCompute runs an array's tasks in turn, each with its own state. Step 2b of docs/design/session-watcher.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
Round 1 — reviewed head fb8aae5e — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.
terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.
Verdict: 1 blocking, 2 advisory.
1 finding attached to the lines below.
Submitted sweeps bypass the GPU concurrency ceiling. [deployment+prose] The candidate-pending/park path passes submitted launches directly to launcher without clamp_concurrency, so a submitted array can request full concurrency and exceed budgets.max_concurrent_gpus. (src/outerloop/orchestrator.py:1709; high confidence)
Advisory (non-blocking):
- Suggestion: The changelog entry packs too many ideas into one sentence. [prose] Sweeps now use Slurm job arrays. Use --concurrency to limit active tasks. max_concurrent_gpus caps that limit. Local compute runs array tasks in order. The queue shows the limit. (
CHANGELOG.md:91; high confidence)
Verdict: blocking—submitted sweep arrays bypass the GPU concurrency clamp (deployment and prose agree); additionally, the queue can lose a running sweep’s configured pace, and the changelog needs the supplied prose rewrite. Rejected: none; the prose orchestrator finding was consolidated with the equivalent deployment finding rather than recorded separately.
…ace in the queue view Review round 1: a submit's sibling sweep reached the launcher unclamped (the clamp sat on the author-sleep path only); it now applies right after the budget check, before either path submits or records. The ledger keeps each launch's concurrency, so the queue view shows a sweep's pace after the pending range is gone and only running tasks remain. CHANGELOG entry in plain sentences. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Step 2b of the session-watcher design note (#316): sweeps as throttled Slurm job arrays, replacing the fan-out into N separate jobs.
launch --array Nsubmits--array=0-(N-1)%K. The queue holds one entry that accrues priority as one job; Slurm runs at most K tasks at once; the wake'safteranyon the array id covers every task.write_eval_job(array=N)writes one script whose task derives its job direval-launch-<name>.<k>andSWEEP_INDEXfromSLURM_ARRAY_TASK_ID(orSWEEP_INDEXunder a local run), and creates and clears the N task dirs. Result gathering by<name>.<k>is unchanged.launch --concurrency K(default: the whole array).budgets.max_concurrent_gpusis a ceiling in GPUs:clamp_concurrencysets K to at mostceiling // gpus(a two-GPU task gets half the tasks of a one-GPU task and the same share of the machine), never below one, before the launcher submits and before the park records the request. Clamped, never refused; the wake text says each sweep's pace. Unset ceiling: the author's pace stands.<id>_<k>is a job id (_check_job_id), so states, elapsed times and cancels work per task.SlurmCompute.statuson an array id combines the per-tasksacctlines (combine_states: running while any task runs, pending while any waits, terminal only when all are; COMPLETED only if all are).launch_task_idsexpands one id per launch forannotate_launch_statesand the GPU-hour refund; a park recorded before this change carries one id per task and passes through; an unknown mapping yields none rather than a guess.<id>_<k>and the pending range<id>_[0-15%4]back to it and reads K off the range, and the tool renders "(sweep, K at a time)".SLURM_ARRAY_TASK_IDand its own persisted state; the array's state is theirs combined.Follow-up for the lab: set
budgets.max_concurrent_gpus: 12in the gpt-speedrun contract.🤖 Generated with Claude Code