Skip to content

[NVBug 6783212] Declare metadata on GuiCoordinateVerifyResponse so it survives eval #4495

Closed

Description

@qiaochuz-nv

Queue rank 8/48 · Difficulty 2/5 · Status on main: not_fixed

NVBug: https://nvbugspro.nvidia.com/bug/6783212 · NVBug priority: Unprioritized · ARB: Danial Mohseni Taheri
GitHub: none found (no PR/issue; JIRA NMGYM-58)

Summary

The gui_coordinate README (README.md:32) promises per-row metadata is "passed through". It is present in all materialized inputs but absent from every saved rollout row. The verifier response schema never declares metadata, so Pydantic's default extra="ignore" drops it. Coordinate scoring is unaffected; this is a response-schema/doc contract mismatch.

Reproduction

gym env start --resources-server gui_coordinate --model-type vllm_model &
gym eval run --no-serve --agent gui_coordinate_simple_agent \
  --input gui_inputs.jsonl --output gui_rollouts.jsonl

Inputs carry metadata={"fixture_id":...}; saved rollout rows have no top-level metadata key (5/5 inputs, 0/5 outputs).

Root cause

resources_servers/gui_coordinate/app.py: GuiCoordinateRunRequest declares metadata (line 39) but GuiCoordinateVerifyResponse (lines 46-50) does not. verify() calls GuiCoordinateVerifyResponse(**body.model_dump(exclude={...}), ...) (lines 119-133); the metadata kwarg is an undeclared field and is discarded because BaseVerifyResponse inherits the default extra="ignore" (base_resources_server.py:92-93, 107). Confirmed, not hypothesis.

Status on main (not_fixed)

HEAD 75bb53e. git diff <tested-rev>..HEAD -- resources_servers/gui_coordinate/app.py shows only + ray_enabled = False; metadata logic is byte-identical to the reported revision. grep metadata app.py → only line 39 (request). README.md:32 still states pass-through. No fixing PR/commit/issue found.

Proposed fix

One-line schema addition in resources_servers/gui_coordinate/app.py:

class GuiCoordinateVerifyResponse(BaseVerifyResponse):
    expected_answer: str
    extracted_x: Optional[float]
    extracted_y: Optional[float]
    distance: Optional[float]
    metadata: Optional[dict[str, Any]] = None   # new

verify() needs no change — **body.model_dump(...) already supplies metadata. The saved rollout preserves it end-to-end: simple_agent/app.py:486-502 forwards the /verify JSON and SimpleAgentVerifyResponse uses extra="allow" (line 100), so the field propagates with no whitelist. Add a unit test calling verify() with a metadata-bearing request and asserting the response carries it unchanged.

Validation

Unit: new assertion in resources_servers/gui_coordinate/tests/test_app.py (no GPU). E2E: QA testcases/environments/gui_coordinate.py — its case "five independent GUI screenshots follow documented coordinate scoring and preserve output metadata" asserts output_has_metadata and output_metadata == input_metadata (lines 416-420). Rerun it (needs Qwen3-VL-8B on one H100) to confirm the named case flips to pass.

Triage

Difficulty 2/5 — localized schema edit, root cause pinpointed, unit-testable without GPU. Needs GPU/model: no for the fix+unit test (yes for the full QA e2e). External dependency: none.

Reviewer notes

Verifier confirmed not_fixed and difficulty 2 (code schema edit plus a new behavioral test; single component, no gym-wide contract change). Added proof the one-line fix reaches the saved rollout: simple_agent/app.py:486-502 forwards the /verify JSON and SimpleAgentVerifyResponse (extra="allow", line 100) preserves extras. QA case name and metadata assertions match the record. Title could read "...survives eval output" for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions