Add NeMo Gym V1 integration - #2212
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Migrated review contextThis PR carries the exact head commit from the prior fork-backed review. Outstanding point retained for follow-up:
|
| for _ in range(60): | ||
| try: | ||
| port = int((await runtime.read("nemo_gym.port")).decode()) | ||
| config.resources_url = f"http://127.0.0.1:{port}" |
There was a problem hiding this comment.
🟠 High nemo_gym/taskset.py:335
NeMoGymEnv.start always probes http://127.0.0.1:{port} and sets that as resources_url, but the child server binds to whatever address NEMO_GYM_HOST specifies in its environment. When that variable is set to a non-loopback interface, the server is healthy but not listening on 127.0.0.1, so the health check never succeeds, start times out, and managed tasks cannot run. The host used in the probe URL must match the host the child server actually binds to.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @verifiers/v1/tasksets/nemo_gym/taskset.py around line 335:
`NeMoGymEnv.start` always probes `http://127.0.0.1:{port}` and sets that as `resources_url`, but the child server binds to whatever address `NEMO_GYM_HOST` specifies in its environment. When that variable is set to a non-loopback interface, the server is healthy but not listening on `127.0.0.1`, so the health check never succeeds, `start` times out, and managed tasks cannot run. The host used in the probe URL must match the host the child server actually binds to.
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR adds a new NeMo Gym V1 integration with substantial new components including taskset classes, server lifecycle management, and MCP toolset bridging. New integrations of this scope warrant human review. Additionally, an unresolved comment flags a potential bug in the server health check logic. You can customize Macroscope's approvability policy. Learn more. |
4ee6a93 to
44df475
Compare
44df475 to
3cc18e5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a609293. Configure here.

Overview
Adds a NeMo Gym resources-server integration for Verifiers V1. Existing Verifiers harnesses drive the rollout while NeMo Gym remains responsible for resource-server state, native tools, and scoring.
Details
/verifyrewards and numeric metrics.nemo-gymoptional dependency and reuses resource-server classes from the published package, with V1 owning startup and cleanup.environments/nemo_gym_weather_v1as a thin, self-starting example package; external resource-server URLs remain supported for custom deployments.Fixes RES-1090
Note
Medium Risk
New subprocess server lifecycle, HTTP/MCP bridging, and trace-to-Responses scoring affect eval correctness; dependency-metadata changes pull Ray and related packages when the extra is enabled.
Overview
Adds NeMo Gym as a V1 taskset path so Verifiers harnesses drive rollouts while Gym resource servers own session state, tools, and
/verifyscoring—not Gym’s native agent stack.Core integration (
verifiers/v1/tasksets/nemo_gym/): JSONL rows withresponses_create_paramsbecome tasks; each rolloutPOSTs the row to/seed_session, exposes Gym tools to MCP harnesses via_NeMoGymToolset(MCP-over-HTTP or direct HTTP), then converts a single-branch trace to a NeMo Responses object and scores via/verify.NeMoGymEnvcan spawn a packaged resource server in a subprocess (port file + health poll) or you can setresources_urlfor an external server.Supporting changes:
mcp_sessioninlaunch.pyfor scoped MCP HTTP client sessions; optionalnemo-gym==0.4.0extra with uv dependency-metadata to trim NeMo’s full platform install; exampleenvironments/nemo_gym_weather_v1; docs and e2e eval wiring with editable env packages.Reviewed by Cursor Bugbot for commit 185dbd2. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add NeMo Gym V1 taskset integration with managed resource server lifecycle
NeMoGymTasksetandNeMoGymEnvin taskset.py to load tasks from a JSONL dataset, seed sessions on a NeMo Gym resource server, expose tools via MCP-over-HTTP or direct HTTP, and compute rewards via the server's/verifyendpoint.NeMoGymEnv.start/stopto automatically launch a local resource server subprocess, poll for readiness via a port file, and inject the resolved URL into task config — no manual server management needed.mcp_sessionasync context manager in launch.py for HTTP-based MCPClientSessionconnections with a 600s timeout.NeMoGymWeatherTasksetexample environment in environments/nemo_gym_weather_v1 backed by a bundledexample.jsonldataset.nemo-gym==0.4.0as an optional dependency (Python >=3.12) in pyproject.toml installable viaverifiers[nemo-gym].Macroscope summarized 185dbd2.