Repository navigation
fix(gui_coordinate): keep per-row metadata in the verify response - #4554
Merged
yaoyu-33 merged 1 commit intoOct 13, 2026
Merged
Conversation
The README says per-row `metadata` is passed through, and the request model accepts it, but GuiCoordinateVerifyResponse did not declare it. pydantic's default extra="ignore" dropped it, so saved rollout rows from `gym eval run` never had it. Declare the field; verify() already passes it in from the request. Fixes NVBug 6783212. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: qiaochuz <[email protected]>
yaoyu-33
approved these changes
Oct 13, 2026
yaoyu-33
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Metadata is preserved through verification and response validation without changing rewards. Focused tests and metadata boundary checks passed.
yaoyu-33
enabled auto-merge
October 13, 2026 02:27
Contributor
Author
|
/ok to test 40767fa |
Contributor
|
/ok to test 40767fa |
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38339683338 |
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38340492158 |
yaoyu-33
deleted the
qiaochuz/nvb-6783212-gui-coordinate-verify-metadata
branch
October 13, 2026 03:25
This branch was previously deployed
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.
What does this PR do?
gui_coordinaterollouts now keep each row'smetadata, as the server's README says (metadata"is passed through and is not used for scoring"). Before this PR,gym eval runsaved rollout rows without it, even though every materialized input row had it. Scoring is unchanged.Fixes NVBug 6783212.
Closes #4495.
Cause
GuiCoordinateRunRequestdeclaresmetadata(resources_servers/gui_coordinate/app.py:39), butGuiCoordinateVerifyResponsedid not.verify()builds its response from**body.model_dump(...), sometadataarrived as a keyword the response model didn't declare.BaseVerifyResponsekeeps pydantic's defaultextra="ignore", so the field was dropped. The simple agent returns the/verifyJSON as the rollout row, so the saved row had nometadata. The server has done this since it was added in #2332; the README line came later in #2377. The committeddata/example_rollouts.jsonlfrom #2332 shows it too: all 5 input rows havemetadata, and none of the 5 rollout rows do.Fix
Declare
metadata: Optional[dict[str, Any]] = NoneonGuiCoordinateVerifyResponse.verify()already passes the request's value in, so nothing else changes. Downstream, the simple agent andimage_tools_agentboth validate the/verifyJSON withextra="allow", and rollout collection writes the/runresult as the row, so the field reachesrollouts.jsonl.Alternatives not taken:
GuiCoordinateVerifyRequest, as 16 servers do. That would also echomax_dist, which the README doesn't promise. Declaring only the documented field keeps the diff to what the README says.metadatais kept only in*_materialized_inputs.jsonl. Nothing in the gui_coordinate PRs or docs narrows "passed through" that way, and the QA case reads the README as promising it in saved output.Not changed:
data/example_rollouts.jsonl. It is model output from #2332 and still lacksmetadata; regenerating it needs a GPU run of the example and would replace all five model outputs.Test:
test_verify_passes_metadata_throughcallsverify()with a metadata-bearing request and checks that the serialized response carries the same dict, and that the reward is unchanged.Before the fix
Gym
91d8c6c9f(main), with this PR's test file, fromresources_servers/gui_coordinate:End to end, the NVBug's QA case runs the README flow (
gym env start+gym eval run --no-serve --agent gui_coordinate_simple_agent) on 5 independent GUI screenshots with Qwen/Qwen3-VL-8B-Instruct on one H100. Its scoring and/verifycontrol checks pass; it fails only on saved-output metadata:After the fix
Gym
40767fa54(this branch), same command:Same QA case, same model and inputs:
Validation
pytestinresources_servers/gui_coordinate: before 1 failed / 12 passed; after 13 passed.gym env test --resources-server gui_coordinate(server venv): 13 passed.tests/unit_tests/test_task_data.py::TestSchemaPresenceandtests/unit_tests/test_ray_opt_out.py: 21 passed.pre-commit run --all-files: passed, no changes.gui_coordinate(5 independent GUI screenshots, Qwen/Qwen3-VL-8B-Instruct on one H100): before 0/1 (fails ondocumented metadata pass-through), after 1/1. The rows went throughgui_coordinate_environment_server(legacy_agent), so the relay path is covered.metadata. Model rewards were 0.0 on both commits: Qwen3-VL-8B answered in an attribute form (<point x1="862" y1="207" ...>) that the documented<point>(x, y)</point>parser does not match. That is unchanged by this PR. The case's 17 direct/verifycontrols still score 1.0, 0.25 and 0.0 where expected, and each control response now includesmetadata.Compatibility
Rollout rows from
gui_coordinategain a top-levelmetadatakey: the row's dict, ornullwhen the input row has none. Rewards, metrics, and other fields are unchanged.🤖 Generated with Claude Code