Recycle problem runner workers between problems.#8
Closed
rohangpta wants to merge 1 commit into
Closed
Conversation
Collaborator
|
I like this fix and thank you for adding it. But why does it need all of the CLI utils / other parts? |
Collaborator
|
Closing this in favor of the smaller one. |
Contributor
Author
|
my apologies, #12 here is the right separate PR for the patch I had in the |
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.
Why
Long SCBench runs execute many problems through a small process pool. Each problem builds a full agent/evaluation/
runtime stack: agent clients, Docker clients, subprocesses, temp dirs, logging state, progress threads, and third-
party library caches.
The code has explicit cleanup paths, but over a long horizon any missed cleanup, process-local cache growth, leaked
descriptor, or stale third-party state can accumulate inside a reused worker. When that happens, failures show up
late in the run and are hard to attribute to the problem that caused the leak.
Recycling the worker after each problem gives each problem an OS-level cleanup boundary. It does not replace normal
cleanup; it limits the blast radius when cleanup is imperfect.
What Changed
max_tasks_per_child=1on the problem runnerProcessPoolExecutor. (note: this adds process spawn overhead between problems. That should be small relative to agent/problem execution time)