Add NeMo Gym V1 integration - #2032
Conversation
de9f35a to
9cea5a6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e42f163ddc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d9bc2c714
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9d9bc2c to
af98d46
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af98d46f17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
af98d46 to
f18134d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f18134dd1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9656d11 to
6cb4d40
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 6cb4d40. Configure here.
cc45698 to
4ee6a93
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ee6a934da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for item in output: | ||
| name = str(item.get("name", "")) | ||
| bare_name = name.removeprefix("_") | ||
| if item.get("type") == "function_call" and bare_name in known_names: | ||
| item["name"] = bare_name |
There was a problem hiding this comment.
Normalize Codex MCP tool names before verification
When this taskset is used with the Codex harness, its empty MCP server ID (TOOL_PREFIX = None) is exposed to the model under the mcp___ namespace by verifiers/v1/harnesses/codex/harness.py, so recorded function calls retain an mcp__...-qualified name. Removing only one leading underscore leaves that qualification intact, and /verify receives a name that is not among the original Gym tool names even though the tool executed successfully, causing tool-dependent Codex rollouts to be rejected or mis-scored. Normalize the Codex-qualified form back to an entry in known_names.
Useful? React with 👍 / 👎.
|
Superseded by #2212 after migrating the exact head commit to an upstream-owned branch. Outstanding review context and reviewer requests were carried forward. |

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 eval/scoring path depends on external HTTP/MCP servers and subprocess lifecycle; trace→response conversion must match Gym’s verifier contract, but changes are isolated behind the new taskset and optional extra.
Overview
Adds NeMo Gym V1 integration so verifiers harnesses can run Gym JSONL tasks against resources servers while Gym keeps session state, tools, and
/verifyscoring.NeMoGymTaskset/NeMoGymTaskload JSONL rows withresponses_create_params, callPOST /seed_sessionper rollout (cookies + optional MCP metadata), expose Gym tools through_NeMoGymToolset(MCP HTTP or direct HTTP), and score by converting a single-branch trace to a NeMo Responses object and posting to/verify.NeMoGymEnvoptionally spawns a packaged resource server viaverifiers.v1.tasksets.nemo_gym.serverwhen noresources_urlis set; subclasses setresource_serverto an import path.Adds
mcp_sessioninverifiers/v1/mcp/launch.pyfor short-lived MCP HTTP client sessions. Adds optionalverifiers[nemo-gym](nemo-gym==0.4.0, Python ≥3.12) with uv dependency-metadata to trim the install graph, plusenvironments/nemo_gym_weather_v1anddocs/v1/nemo_gym.md.Reviewed by Cursor Bugbot for commit 4ee6a93. 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 verifiers/v1/tasksets/nemo_gym/taskset.py that load tasks from a JSONL dataset, seed per-rollout server sessions, and score completions by calling a NeMo Gym resources server verifier.NeMoGymEnvmanages a subprocess-based resources server: on start it spawns the server, discovers its port vianemo_gym.port, and tears it down on stop. External server URLs are also supported._NeMoGymToolsetsupports both MCP HTTP and direct HTTP endpoints, exposing gym tools to agents with consistent MCP-style results.mcp_sessionasync context manager for streamable MCP HTTP client sessions with configurable timeout.nemo-gym-weather-v1example environment and documentation in docs/v1/nemo_gym.md.nemo-gym==0.4.0is pinned as an optional dependency (nemo-gymextra) and requires Python >=3.12; the managed server subprocess writes a port file and times out if the server fails to start.Macroscope summarized 4ee6a93.