You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 89904fb
Browse filesBrowse the repository at this point in the historyBrowse files
Avoid starting a Slurm step for every SWE-bench tool call (#522)
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
Copy file name to clipboardExpand all lines: AGENTS.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,19 @@ The aggregator is a separate process (`python -m inference_endpoint.async_utils.
140
140
-**Post-run service wait**: `drain_and_build_report` waits for service subprocesses **unbounded** (`wait_for_exit(None)`). `wait_for_exit` SIGKILLs on expiry, and the aggregator writes `final_snapshot.json` — the Report's primary source — as the last thing it does, so a parent-side deadline here trades a wedged-service hang for a lost snapshot. The abort path keeps its own ceiling (`interrupted_teardown_grace_s`, 30s), and the whole-run watchdog stays armed throughout.
141
141
-**Histogram bucket edges are dynamic per snapshot**: log-spaced over the observed `[min, max]`. Bucket count is fixed at construction; consumers MUST re-render from the snapshot's `(lo, hi, count)` triples each frame and MUST NOT track bucket-by-index across snapshots.
142
142
143
+
### SWE-bench Pyxis command transport
144
+
145
+
`evaluation/swebench_service/swebench_service/pyxis_persistent.py` owns one
146
+
long-lived Slurm step per agent environment. The container runs the packaged
147
+
`pyxis_command_worker.sh`, staged in a private control mount separate from tool
148
+
`/tmp`. Worker startup retries only confirmed prelaunch Slurm failures before any
149
+
request is published. A lock serializes callers through one atomically published
150
+
request directory and completion marker.
151
+
Commands run in fresh PID namespaces; accepted requests are never replayed after an
152
+
uncertain failure. `pyxis_environment.py` owns container creation, command result
153
+
mapping, and worker-before-container cleanup. All tool commands use the persistent
154
+
worker. Evaluation remains in `pyxis_worker.py`.
155
+
143
156
### CLI Modes
144
157
145
158
CLI is auto-generated from `config/schema.py` Pydantic models via cyclopts. Fields annotated with `cyclopts.Parameter(alias="--flag")` get flat shorthands; all other fields get auto-generated dotted flags (kebab-case).
0 commit comments