Skip to content

Avoid starting a Slurm step for every SWE-bench tool call - #522

Merged
leopck merged 10 commits into
mainfrom
sphoong/swe-persistent-pyxis
Sep 30, 2026
Merged

leopck merged 10 commits into
mainfrom
sphoong/swe-persistent-pyxis

Conversation

@leopck

@leopck leopck commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

We currently launch a new srun step 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 with RunnerError

This 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

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.
@leopck
leopck requested a review from a team September 30, 2026 02:42
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@github-actions github-actions Bot added the size/normal PR Review Policy: <=500 non-test lines & <=20 files label Sep 30, 2026

@arekay-nv arekay-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!

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.
@leopck
leopck merged commit 89904fb into main Sep 30, 2026
10 checks passed
@leopck
leopck deleted the sphoong/swe-persistent-pyxis branch September 30, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/normal PR Review Policy: <=500 non-test lines & <=20 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants