Repository navigation
Conversation
|
/ok to test 97f8001 |
There was a problem hiding this comment.
Thanks for this. It closes a real gap for the config migration in #4953: without it, moving the simple_agent relay configs onto single_agent_turn_legacy would silently drop the global skip_verification. The precedence rule (this server's own setting, else the bound agent's) is easy to follow, the outcome policy still runs before the skip, and both sessions are still closed. The new tests assert real behavior. Both suites pass at this head (103 and 19), and the new cases fail on main.
Two inline comments:
- Risk: the agent fallback coerces with
bool(...), so a string"false"turns into a skip. - Note: the Compatibility section misses one behavior change for pairings with agents other than
simple_agent.
Smaller points, not posted inline:
- The
aggregate_metricsdocstring still says it always forwards to the resources server. - The rollout evidence uses a stub model. Because this path does not depend on model output, that seems fine here. It would still help to say so as the explicit N/A that AGENTS.md asks for, or to add one real-model smoke run.
- Validation lists scoped
pre-commit run --files, not--all-files.
Verdict: ship with care once the boolean coercion is fixed.
|
/ok to test 92a3e6a |
|
/ok to test e9d96f3 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — LGTM — no reliability concerns.
Reviewed all four changed files and traced configuration fallback, outcome-policy ordering, session cleanup, checkpoint restore, and legacy result projection. The fallback now parses string values with Pydantic, resolving the earlier "false" issue. The README also documents the effect on all bound agents. No actionable BLOCKER, RISK, or NOTE findings remain.
Validation was static source and test inspection only; I did not execute tests or reproduce the PR-reported rollout evidence.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
single_agent_turn always called the resources server's /verify, and the global skip_verification flag is copied only into agent configs. Moving a simple_agent pairing off the legacy_agent relay therefore dropped the setting silently (GYMINT-235, blocking GYMINT-549). The environment server now takes skip_verification and skip_verification_reward. Unset, each falls back to the bound agent's value, which carries the global flag. When skipping, the episode returns the flat verify body with the fixed reward and verification_skipped=true, still applies the agent outcome policy, and still closes both sessions. /aggregate_metrics returns empty metrics, as an agent's does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
The fallback to the bound agent's skip_verification used bool(), so a string "false" from a quoted
override or an ${oc.env:...} interpolation skipped /verify while the agent itself verified. Parse
both fallbacks with pydantic, as the agent's config does, and test the string and explicit-false
cases. The README now says the global flag also reaches agents whose own /run never read it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Restoring an episode at its verify boundary with skip_verification on closes the resources session without calling /verify, and aggregate metrics are empty when the skip comes from the bound agent. The README and the code comment no longer say that reward profiling and training read verification_skipped; nothing does yet, but the flag lets a reader tell the fixed reward apart. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Merge main at 5a31c28, preserving skip-verification behavior and using resources_verify_step_type in the verification branch. Validation: 284 tests passed across both affected server suites and checkpoint environment, contract, and declaration suites. pre-commit run --all-files and git diff --check passed. Tests used NEMO_GYM_EXTRA_ROOTS and PYTHONPATH pointing at this worktree to avoid the shared editable install. Rollout evidence: N/A for this conflict-only update; the resolution follows the upstream field rename and introduces no additional runtime behavior. Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 496ae53 |
Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 6b9fe7f |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40551705110 |
Conflicts: - rollout_collection.py: #5029 tells the exporters to start a new tracking run when a resume finds nothing to resume. #3302 makes that decision in RolloutStore.start_or_resume, so the store now reports started_fresh and the collector calls start_over() after it when a resume was requested. - single_agent_turn_legacy tests: kept both new tests (#4949's skip_verification test and #3302's). Tests from main adapted to #3302's rules: - A run with history whose output or materialized inputs are missing refuses to resume rather than start over, so it keeps its tracking run. The start-over case is a resume with nothing saved. - The string-flag collection test supplies the running servers' configuration, which the run manifest fingerprints. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Yuhe Zhang <[email protected]>
What and why
simple_agentalready serves agent sessions and is the only agent that resumes inside its turn, but about 307 configs still reach it through thelegacy_agentrelay. Moving them tosingle_agent_turn_legacy(#4953) is the largest single cut in restart cost. One thing blocks it:single_agent_turnalways calls/verify, and the globalskip_verificationflag is copied only into agent configs (nemo_gym/global_config.py,validate_and_populate_defaults). Switching a config today drops the setting without a warning.This PR makes
single_agent_turn, and thesingle_agent_turn_legacyadapter built on it, honor the setting:skip_verificationandskip_verification_reward. When either is unset, it falls back to the bound agent's value. That value already carries the global flag and any explicit agent-level setting (for examplecritpt_custom_grader), so a pairing moved off the relay keeps behaving as its agent's/rundid. An explicit environment-server value wins over the agent's./verify. It returns this server's verified result shape: the verify body, plus the fixedrewardandverification_skipped: truethatsimple_agent's/runalso sets. The flag lets anything reading the result tell it apart from a measured reward; nothing in Gym filters on it yet./aggregate_metricswarns and returns empty metrics, as an agent's does underskip_verification.Out of scope, to keep this PR focused:
nemo_user_simandharborstill ignore the flag. They are not on thesimple_agentswitch path and remain separate follow-up work.Completes skip-verification support for
single_agent_turn; the other Environment Servers remain separate follow-up work.Design
Markers: green NEW, orange CHANGED, red dashed BROKEN; the label text says the same, so the diagrams read without color.
Before and after
The global
+skip_verification=trueflag is copied only into agent configs. Under the relay, the agent's/runran the whole episode and read it. Undersingle_agent_turn_legacy, the environment server runs the episode, and before this PR it never looked at the flag.Before
flowchart LR G["global +skip_verification=true"] -->|copied into| AC["simple_agent config<br/>skip_verification: true"] subgraph relay["legacy_agent relay (today, ~307 configs)"] R1["agent /run"] -->|reads flag| R2["skip /verify<br/>reward = fixed, verification_skipped"] end subgraph sat["single_agent_turn_legacy (before this PR)"] S1["seed → agent turn → close agent"] --> S2["always POST /verify"] S2 --> S3["reward from resources server"] end AC --> R1 AC -. "never read: setting silently dropped" .-> S1After
flowchart LR G["global +skip_verification=true"] -->|copied into| AC["simple_agent config"] EC["environment server config<br/>skip_verification / skip_verification_reward<br/>(optional)"] subgraph sat["single_agent_turn_legacy (this PR)"] D{"skip?<br/>env setting if set,<br/>else the agent's"} S1["seed → agent turn → close agent<br/>outcome policy still applies"] --> D D -->|no| V["POST /verify<br/>reward from resources server"] D -->|yes| K["no /verify<br/>reward = fixed<br/>verification_skipped: true"] V --> C["close resources session"] K --> C end EC --> D AC --> DEpisode control flow (
single_agent_turnandsingle_agent_turn_legacy). The skip replaces only the/verifystep. The outcome policy runs before it, and the resources session is closed on both paths.sequenceDiagram autonumber participant RC as Rollout collection participant ES as single_agent_turn(_legacy) participant AG as simple_agent session participant RS as Resources server RC->>ES: /run (flat row) ES->>RS: /seed_session (typed) ES->>AG: /v1/agent_sessions ES->>AG: /v1/responses (one turn) ES->>AG: /v1/agent_sessions/close Note over ES: agent outcome policy still applies:<br/>a retryable failure stays a failure, never a fixed reward alt NEW: skip_verification (server setting, else the agent's) Note over ES: NEW: no /verify<br/>reward = skip_verification_reward<br/>verification_skipped: true else not skipped (unchanged) ES->>RS: /verify (session cookie) RS-->>ES: reward end ES->>RS: /close_session (both paths) ES-->>RC: flat result rowValidation
environment_servers/single_agent_turn/tests/test_app.py: 109 passed. Thirteen new cases cover:falseoverriding an agent'struefalseor as the string"false"(a quoted override or${oc.env:...}value), keeps verifyingverifyboundary closing the resources session without verifyingenvironment_servers/single_agent_turn_legacy/tests/test_app.py: 19 passed. The new case runs a flat row with the agent's setting, which is the migration case covered by chore(configs): move simple_agent configs off the legacy_agent relay #4953.main(checked by revertingapp.py). The string"false"case fails on the first commit of this PR, which usedbool(...).pre-commit run --all-files: all hooks pass, no files modified.test_appmodule name, as it does onmain.Rollout evidence
This runs the real Gym servers against a stub model, not a real one. No model endpoint was available in this environment. A real-model rollout is N/A for this change: whether
/verifyis called depends only on configuration, not on model output, and the stub run exercises the real servers end to end and counts every call.Config
resources_servers/example_single_tool_call/configs/example_single_tool_call_single_agent_turn.yaml(simple_agent throughsingle_agent_turn_legacy, stateful resources sessions) withopenai_modelpointed at a local stub Responses endpoint. Two rows;gym env startwith+uvicorn_logging_show_200_ok=true, thengym eval run --no-serve.verification_skipped/verifycalls/seed_session//close_session+skip_verification=true +skip_verification_reward=0.75(global flag only)/verify)The global flag reached the environment server through the agent config, with no environment-server setting. The skip run's aggregate metrics file is empty.
Compatibility
Existing configs behave the same unless the agent or the run sets
skip_verification:skip_verificationon asimple_agentbound tosingle_agent_turnnow skip, where before they silently verified. That is the intended fix.+skip_verification=truealso reaches existingsingle_agent_turnpairings whose agent is notsimple_agent, because Gym copies the flag into every agent config. Examples arebenchmarks/gdpval/config.yaml(stirrup),benchmarks/swebench/pro/hermes.yaml, andresponses_api_agents/nooa_agent/configs/nooa_agent.yaml. Those pairings verified before and now skip under the flag, as asked.🤖 Generated with Claude Code
CI refresh (2026-10-23)
Rebased onto
mainat8041d1910and preserved the existing stack bases. This includes #4973's atomic resubmit-lock fix and #4966's TerminusPROMPT_COMMANDfix, which address the failures in the previous CI runs. No additional runtime behavior changes were introduced by this refresh.Resolved the import conflict with #4945 while retaining both the shared dependency-error helper and the skip-verification tests.
pytest --import-mode=importlib environment_servers/single_agent_turn/tests/test_app.py environment_servers/single_agent_turn_legacy/tests/test_app.py tests/unit_tests/test_eval_resubmit.py: 176 passed.pre-commit run --all-files,git diff --check, and DCO trailer checks passed. Fresh Linux CI is still required on the new head. Rollout evidence for this refresh: N/A; this only rebases the existing changes onto the upstream CI fixes.