Repository navigation
fix(stirrup_agent): pin Ray worker venv via runtime_env (fixes GDPVal reward=0) - #1140
Merged
Merged
Conversation
…le": sys.executable} `run_stirrup_agent_remote` was decorated with bare `@ray.remote(scheduling_strategy="SPREAD")`, so Ray scheduled the task on workers using the cluster's default Python rather than the stirrup_agent server's `.venv`. The per-server `stirrup>=0.1.7` extra (declared as an extra-of-the-server, not of core, per PR #1090) is therefore absent from the worker, and every rollout dies at `_run_stirrup_agent`'s from stirrup.tools import DEFAULT_TOOLS with `ModuleNotFoundError: No module named 'stirrup'`. The agent catches the exception per-rollout, sets `reward=0.0`, and the resources server in turn short-circuits without calling the judge — observed end-to-end as a 220-task GDPVal run that completes structurally but reports `mean/reward=0.0` across every group. The judge (`gdpval_judge_model`) log shows zero `/v1/*` requests. Add `runtime_env={"py_executable": sys.executable}` to the decorator, matching the established pattern in: responses_api_agents/swe_agents/app.py:1085 responses_api_agents/harbor_agent/app.py:183 responses_api_agents/mini_swe_agent/app.py:79 resources_servers/code_gen/lcb_integration/compute_code_generation_metrics.py:56 resources_servers/spider2_lite/eval_utils.py:71 resources_servers/swerl_gen/eval/singularity_utils.py:203 Workers now inherit the agent's venv, find `stirrup`, and the rollout pipeline runs end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: Alex Gronskiy <[email protected]>
bxyu-nvidia
approved these changes
Apr 27, 2026
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.
Problem
responses_api_agents/stirrup_agent/app.py:117decorates the Ray remote function with bare@ray.remote(scheduling_strategy=\"SPREAD\"), so Ray dispatches the task to workers using the cluster's default Python rather than the stirrup_agent server's.venv. Thestirrup>=0.1.7extra is declared as an extra of the stirrup_agent server, not of core (intentionally, per PR #1090), so it's only present inresponses_api_agents/stirrup_agent/.venv— not on Ray workers.Every rollout therefore hits, at
_run_stirrup_agentline 150:with
ModuleNotFoundError: No module named 'stirrup'. The agent catches the exception per-rollout, setsreward=0.0, and proceeds. The resources server then short-circuits without calling the judge.Fix
Add
runtime_env={\"py_executable\": sys.executable}to the decorator, matching the well-established pattern in the rest of the codebaseTest plan
ruff check/ruff format --checkcleaninstall_on_the_fly.committo this branch's HEAD and post results in the linked GDPVal thread@ray.remotepattern was intentional for stirrup specifically