feat: schedule Slurm jobs with weighted runner leases - #2440
Conversation
|
Claude finished @cquil11's task in 8m 4s —— View job Review — feat: schedule Slurm jobs with weighted runner leases
Summary: One 🟡 warning — an empty |
6013139 to
f039c26
Compare
| @@ -1,20 +1,24 @@ | |||
| import argparse | |||
There was a problem hiding this comment.
📊 Line Count Report
- Total Lines: 1525
- Base Lines: 1383
- Change: 📈 +142 lines
f039c26 to
6bd0906
Compare
Derive each benchmark allocation size from explicit aggregate node counts, recipe resources, or topology; expose it as nodes:N queue metadata; and use node count as a secondary priority signal.\n\nIntegrate with dynamic aggregate-capacity leases from the priority controller while keeping the feature disabled by default. Historical matrix rows without node-count fall back to legacy one-node accounting instead of requesting an unsatisfiable nodes: label.
6bd0906 to
fd835b3
Compare
Summary
This proof of concept adds exact weighted GitHub-side admission for Slurm allocations.
node-countfor every multi-node matrix row from an explicit aggregatenum-nodes, checked-in recipe resources, explicitPREFILL_NODES/DECODE_NODES, or worker GPU topology.num-nodesonly formultinode: true, disagg: false; disaggregated entries reject it because their separate prefill/decode allocations determine the total.nodes:Nto queued jobs when both priority scheduling andNODE_SLOT_SCHEDULER_ENABLED=true; single-node jobs requestnodes:1.nodes:Nas request metadata rather than a permanent runner capability.Runtime allocation is implemented by the existing priority controller in the companion draft PR: inferencex-ci-tracker#7.
The existing aggregate master-config entries are backfilled in the native stacked PR above this one: #2479.
Lease lifecycle
For a job requesting
nodes:3, the controller:cluster:*pool.ci-lease-*label to all three runners.ci-job-*,ci-attempt-*, andnodes:3labels to one anchor runner.The unique
ci-job-*label remains the dispatch gate. The other leased runners stay idle as abstract capacity tokens for the Slurm allocation.On an 18-node pool, a running 10-node lease leaves eight tokens. A queued nine-node job remains blocked, while an eight-node job can backfill the exact remainder. Therefore managed work satisfies:
Slurm remains the final authority for external users, offline compute nodes, reservations, and jobs submitted outside this managed path.
Activation
cluster:*label. Unclustered legacy runners remain eligible only for one-node jobs.NODE_SLOT_SCHEDULER_ENABLED=true.PRIORITY_SCHEDULER_ENABLEDmust also remain enabled.No permanent
nodes:Nlabel plan is required. The controller removes old staticnodes:*labels as it reconciles idle runners.Validation
python -m pytest utils/matrix_logic/ utils/test_ci_priority.py -q— 253 passed.node-count.actionlintfound no new workflow-call or node-lease expression errors; existing unrelated shell/style warnings remain.10 + 9, exact10 + 8backfill, running-lease preservation, invariant coverage for pool sizes 1–20, legacy-runner fallback, and partial-write rollback.