feat(opensandbox): add run-scoped cleanup job - #2559
Conversation
Real Slurm cancellation smoke test: done (the unchecked test-plan box)Two rounds against a live 500-rollout eval, Round 1 — trap inside the containerized eval command: FAILS. When the eval runs under Round 2 — trap in the batch shell (host side, no CLI validation at scale: separately ran the CLI against round 1's 349 orphans — all reaped, zero remaining, correctly scoped to exact run+user. Two suggestions:
🤖 Generated with Claude Code |
287d018 to
cf384cc
Compare
1221a73 to
8242ba9
Compare
Replace the benchmark-specific shell cleanup with a standalone tool that requires exact run and user attribution before deleting sandboxes. Run it from the Slurm batch exit handler so leaked sandboxes are reaped without changing the evaluation's original exit status. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
A cancellation smoke test at ~500-sandbox scale surfaced two gaps. One sandbox out of 498 survived a single-pass reap: deletes race the cancelled workload's own teardown, and a list taken while the set mutates can skip entries across page boundaries. The reap now re-lists after each sweep and repeats (bounded) until the list comes back empty or a sweep stops progressing, which also lets transient delete failures recover instead of failing the epilogue outright. The same test showed the trap-based epilogue never fires when the eval command runs under ray symmetric-run: cancellation tears such shells down before their traps run. The wiring here is safe because the eval is its own srun task; codify that requirement in a comment and preflight the aiohttp dependency at job start instead of discovering it during cancellation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
Signed-off-by: Hemil Desai <hemild@nvidia.com>
e95556a to
b5038e2
Compare
|
/ok to test b5038e2 |
Summary
afteranycleanup job immediately after the evaluation job, giving cleanup its own allocation and time budget after success, failure, timeout, or cancellationTest plan
git diff --checkafteranyCPU job and inherited GPU requests were overridden