Skip to content

fix(stirrup_agent): pin Ray worker venv via runtime_env (fixes GDPVal reward=0) - #1140

Merged
bxyu-nvidia merged 1 commit into
mainfrom
agronskiy/fix/gdpval-ray-py-executable-missing
Apr 27, 2026
Merged

bxyu-nvidia merged 1 commit into
mainfrom
agronskiy/fix/gdpval-ray-py-executable-missing

Conversation

@agronskiy

@agronskiy agronskiy commented Apr 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

responses_api_agents/stirrup_agent/app.py:117 decorates 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. The stirrup>=0.1.7 extra is declared as an extra of the stirrup_agent server, not of core (intentionally, per PR #1090), so it's only present in responses_api_agents/stirrup_agent/.venv — not on Ray workers.

Every rollout therefore hits, at _run_stirrup_agent line 150:

from stirrup.tools import DEFAULT_TOOLS

with ModuleNotFoundError: No module named 'stirrup'. The agent catches the exception per-rollout, sets reward=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 codebase

Test plan

  • ruff check / ruff format --check clean
  • AST parse OK
  • End-to-end re-run on the failing 220-task GDPVal config from the EFB side; will pin install_on_the_fly.commit to this branch's HEAD and post results in the linked GDPVal thread
  • (Author of Add Stirrup agent + GDPVal eval/RL environment #1090 to confirm) — no other places where the bare @ray.remote pattern was intentional for stirrup specifically

…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]>
@copy-pr-bot

copy-pr-bot Bot commented Apr 27, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@agronskiy agronskiy self-assigned this Apr 27, 2026
@bxyu-nvidia
bxyu-nvidia merged commit dba5b9c into main Apr 27, 2026
6 checks passed
@bxyu-nvidia
bxyu-nvidia deleted the agronskiy/fix/gdpval-ray-py-executable-missing branch April 27, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants