Avoid starting a Slurm step for every SWE-bench tool call - #522
Merged
Merged
Conversation
Run each trajectory through one allocation-local command worker by default. Preserve command exit status and timeout output, isolate each command in a PID namespace, and fail without replay after uncertain execution. Retain an explicit per-command-step opt-out.
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
arekay-nv
approved these changes
Sep 30, 2026
arekay-nv
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the quick fix!
hvagadia
reviewed
Sep 30, 2026
hvagadia
approved these changes
Sep 30, 2026
Keep worker control files outside tool /tmp and pass command text over a file descriptor so pkill -f does not match supervisor arguments. Restore bounded retries for recognized Slurm prelaunch failures before worker readiness, without replaying accepted commands. Add regressions for cleanup, signal handling, and startup retry boundaries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
We currently launch a new
srunstep and start Enroot for every tool command, even though we already have the node allocation and container. With several SWE evaluations running together, this creates thousands of Slurm steps and puts a lot of pressure on the scheduler. Simple commands end up taking seconds, and some runs hit the outer watchdog timeout and fail withRunnerErrorThis change keeps one worker running inside each SWE instance’s container and reuses it for tool execution. Persistent execution prevents calling of srun for every tool call. Setup, grading, and cleanup retain their Slurm steps, while command exit codes, timeouts, and process cleanup are preserved.
I've tested this, no impact to accuracy evaluation.
Resolves this issue: #521