Skip to content

feat(resources_servers): add string_match and gui_coordinate verifiers - #2332

Merged
ananthsub merged 6 commits into
NVIDIA-NeMo:mainfrom
DanialTaheri:smohsenitahe/super-omni-verifiers
Aug 6, 2026
Merged

ananthsub merged 6 commits into
NVIDIA-NeMo:mainfrom
DanialTaheri:smohsenitahe/super-omni-verifiers

Conversation

@DanialTaheri

Copy link
Copy Markdown
Contributor

Summary

Adds two lightweight verifiers used by the blended Nemotron Super Omni RL dataset.

string_match — exact/fuzzy answer comparison with boxed/latex extraction. Covers 14,988 of the 60,299 rows in that blend.
gui_coordinate — 2D coordinate containment. Covers 16 rows.

Both subclass BaseVerifyResponse and follow the existing simple-agent contract, so they need no special handling in the rollout path.

Carrying them here removes the need for downstream launchers to copy verifier directories into the Gym checkout at submit time.

@copy-pr-bot

copy-pr-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

DanialTaheri added a commit to NVIDIA-NeMo/RL that referenced this pull request Aug 5, 2026
string_match and gui_coordinate belong in NeMo-Gym, where their
requirements.txt relative path (-e nemo-gym[dev] @ ../../) resolves
correctly without rewriting. They were staged here only because the
pinned Gym revision lacked them.

They are now proposed upstream in NVIDIA-NeMo/Gym#2332; carrying a
second copy here would duplicate code that lives in the correct repo and
invites drift.

Until that lands, a Gym checkout providing both verifiers is a
prerequisite for the Super Omni recipe.
bxyu-nvidia
bxyu-nvidia previously approved these changes Aug 5, 2026

@ananthsub ananthsub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any unit tests you want to ship with these apps?

Two lightweight verifiers used by the blended Nemotron Super Omni RL
dataset, which mixes sources graded by exact/fuzzy string comparison or
by 2D coordinate containment.

string_match covers 14,988 of the 60,299 rows in that blend;
gui_coordinate covers 16. Both subclass BaseVerifyResponse and follow
the existing simple-agent contract, so they need no special handling in
the rollout path.

Carrying them here removes the need for downstream launchers to copy
verifier directories into the Gym checkout at submit time.

Signed-off-by: DanialTaheri <[email protected]>
@DanialTaheri

Copy link
Copy Markdown
Contributor Author

I added the unit tests @ananthsub

DanialTaheri and others added 4 commits August 5, 2026 19:40
…ordinate

Add data/example.jsonl for both servers and declare each via a `datasets:`
block with `type: example` so the dataset is discoverable by tooling.

- string_match: 5 text-only rows covering the boxed, final_answer and
  last_line extraction modes.
- gui_coordinate: 5 rows with inline base64 images; ground truth is derived
  from the source circle metadata normalized on a 1000x1000 canvas.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: DanialTaheri <[email protected]>
… field

Data validation for both servers needs data/example_metrics.json, generated
via `gym dataset collate ... +mode=example_validation`.

The gui_coordinate rows initially collated to 0 examples: every row failed
BaseRunRequest validation because the input_image content items omitted
`detail`, which the schema requires. compute_sample_metrics() swallows the
ValidationError and returns an empty metrics object, so the rows were
dropped silently rather than reported. Add `detail: auto`, matching
circle_click.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: DanialTaheri <[email protected]>
…i_coordinate

Collected by running the example data through simple_agent against
azure/openai/gpt-4.1, as required by the resources server data validation.

- string_match: 5/5 correct (mean reward 1.0) across the boxed, final_answer
  and last_line extraction modes.
- gui_coordinate: mean reward 0.21, mean distance 0.086. Every prediction
  lands in the correct region of the image and reward decreases monotonically
  with distance, which exercises the image decoding, the <point> extraction
  and the quadratic distance reward end to end.

`gym env test +should_validate_data=true` now passes for both servers.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: DanialTaheri <[email protected]>
…table

Generated by scripts/update_env_list.py, the update-readme-table pre-commit
hook. The hook regenerates this table from the resources server configs, so
adding the two servers left the committed table stale and failed Lint.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: DanialTaheri <[email protected]>
@ananthsub
ananthsub merged commit bb9b26d into NVIDIA-NeMo:main Aug 6, 2026
8 checks passed
ananthsub added a commit to ananthsub/Gym that referenced this pull request Aug 6, 2026
…coordinate

`gym env test` counts every server directory as a candidate but only tests
the ones with a README.md, so the two servers added in NVIDIA-NeMo#2332 tripped the
total-vs-tested assertion on main (144 found, 142 tested).

Signed-off-by: Ananth Subramaniam <[email protected]>
ananthsub added a commit that referenced this pull request Aug 6, 2026
…coordinate (#2377)

`gym env test` counts every directory under `resources_servers/` etc. as
a candidate module, but only tests the ones containing a `README.md`
(`nemo_gym/cli/env.py:717`), then asserts the two counts match. #2332
added `string_match` and `gui_coordinate` without READMEs, so main fails
with `Mismatch on the number of total modules found (144) and the number
of actual modules tested (142)`.

This adds a README to each, describing the extraction/scoring behavior,
the input JSONL fields, and how to run them.

Both servers' tests now run: 10 passed for `string_match`, 12 for
`gui_coordinate`. Data validation preconditions hold for both (5
examples, 5 rollouts, `"Number of examples": 5`).

Signed-off-by: Ananth Subramaniam <[email protected]>
DanialTaheri added a commit to NVIDIA-NeMo/RL that referenced this pull request Aug 7, 2026
string_match and gui_coordinate belong in NeMo-Gym, where their
requirements.txt relative path (-e nemo-gym[dev] @ ../../) resolves
correctly without rewriting. They were staged here only because the
pinned Gym revision lacked them.

They are now proposed upstream in NVIDIA-NeMo/Gym#2332; carrying a
second copy here would duplicate code that lives in the correct repo and
invites drift.

Until that lands, a Gym checkout providing both verifiers is a
prerequisite for the Super Omni recipe.

Signed-off-by: DanialTaheri <[email protected]>
DanialTaheri added a commit to NVIDIA-NeMo/RL that referenced this pull request Aug 7, 2026
…rifiers

NVIDIA-NeMo/Gym#2332 is merged, so pin Gym at the merge commit. The
async-gym recipes in this PR list

  resources_servers/string_match/configs/string_match.yaml
  resources_servers/gui_coordinate/configs/gui_coordinate.yaml

in env.nemo_gym.config_paths. Those paths do not exist at the previously
pinned Gym commit, so the recipes could not start until this bump.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: DanialTaheri <[email protected]>
OlegSudakov pushed a commit to OlegSudakov/Gym that referenced this pull request Aug 7, 2026
NVIDIA-NeMo#2332)

## Summary

Adds two lightweight verifiers used by the blended Nemotron Super Omni
RL dataset.

`string_match` — exact/fuzzy answer comparison with boxed/latex
extraction. Covers 14,988 of the 60,299 rows in that blend.
`gui_coordinate` — 2D coordinate containment. Covers 16 rows.

Both subclass `BaseVerifyResponse` and follow the existing simple-agent
contract, so they need no special handling in the rollout path.

Carrying them here removes the need for downstream launchers to copy
verifier directories into the Gym checkout at submit time.

---------

Signed-off-by: DanialTaheri <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
OlegSudakov pushed a commit to OlegSudakov/Gym that referenced this pull request Aug 7, 2026
…coordinate (NVIDIA-NeMo#2377)

`gym env test` counts every directory under `resources_servers/` etc. as
a candidate module, but only tests the ones containing a `README.md`
(`nemo_gym/cli/env.py:717`), then asserts the two counts match. NVIDIA-NeMo#2332
added `string_match` and `gui_coordinate` without READMEs, so main fails
with `Mismatch on the number of total modules found (144) and the number
of actual modules tested (142)`.

This adds a README to each, describing the extraction/scoring behavior,
the input JSONL fields, and how to run them.

Both servers' tests now run: 10 passed for `string_match`, 12 for
`gui_coordinate`. Data validation preconditions hold for both (5
examples, 5 rollouts, `"Number of examples": 5`).

Signed-off-by: Ananth Subramaniam <[email protected]>
DanialTaheri added a commit to NVIDIA-NeMo/RL that referenced this pull request Aug 9, 2026
string_match and gui_coordinate belong in NeMo-Gym, where their
requirements.txt relative path (-e nemo-gym[dev] @ ../../) resolves
correctly without rewriting. They were staged here only because the
pinned Gym revision lacked them.

They are now proposed upstream in NVIDIA-NeMo/Gym#2332; carrying a
second copy here would duplicate code that lives in the correct repo and
invites drift.

Until that lands, a Gym checkout providing both verifiers is a
prerequisite for the Super Omni recipe.

Signed-off-by: DanialTaheri <[email protected]>
DanialTaheri added a commit to NVIDIA-NeMo/RL that referenced this pull request Aug 9, 2026
…rifiers

NVIDIA-NeMo/Gym#2332 is merged, so pin Gym at the merge commit. The
async-gym recipes in this PR list

  resources_servers/string_match/configs/string_match.yaml
  resources_servers/gui_coordinate/configs/gui_coordinate.yaml

in env.nemo_gym.config_paths. Those paths do not exist at the previously
pinned Gym commit, so the recipes could not start until this bump.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: DanialTaheri <[email protected]>
DanialTaheri added a commit to NVIDIA-NeMo/RL that referenced this pull request Aug 11, 2026
string_match and gui_coordinate belong in NeMo-Gym, where their
requirements.txt relative path (-e nemo-gym[dev] @ ../../) resolves
correctly without rewriting. They were staged here only because the
pinned Gym revision lacked them.

They are now proposed upstream in NVIDIA-NeMo/Gym#2332; carrying a
second copy here would duplicate code that lives in the correct repo and
invites drift.

Until that lands, a Gym checkout providing both verifiers is a
prerequisite for the Super Omni recipe.

Signed-off-by: DanialTaheri <[email protected]>
DanialTaheri added a commit to NVIDIA-NeMo/RL that referenced this pull request Aug 12, 2026
string_match and gui_coordinate belong in NeMo-Gym, where their
requirements.txt relative path (-e nemo-gym[dev] @ ../../) resolves
correctly without rewriting. They were staged here only because the
pinned Gym revision lacked them.

They are now proposed upstream in NVIDIA-NeMo/Gym#2332; carrying a
second copy here would duplicate code that lives in the correct repo and
invites drift.

Until that lands, a Gym checkout providing both verifiers is a
prerequisite for the Super Omni recipe.

Signed-off-by: DanialTaheri <[email protected]>
DanialTaheri added a commit to NVIDIA-NeMo/RL that referenced this pull request Aug 13, 2026
string_match and gui_coordinate belong in NeMo-Gym, where their
requirements.txt relative path (-e nemo-gym[dev] @ ../../) resolves
correctly without rewriting. They were staged here only because the
pinned Gym revision lacked them.

They are now proposed upstream in NVIDIA-NeMo/Gym#2332; carrying a
second copy here would duplicate code that lives in the correct repo and
invites drift.

Until that lands, a Gym checkout providing both verifiers is a
prerequisite for the Super Omni recipe.

Signed-off-by: DanialTaheri <[email protected]>
ehosseiniasl pushed a commit to ehosseiniasl/Gym that referenced this pull request Oct 13, 2026
…IDIA-NeMo#4554)

## What does this PR do?

`gui_coordinate` rollouts now keep each row's `metadata`, as the
server's README says (`metadata` "is passed through and is not used for
scoring"). Before this PR, `gym eval run` saved rollout rows without it,
even though every materialized input row had it. Scoring is unchanged.

Fixes NVBug [6783212](https://nvbugspro.nvidia.com/bug/6783212).
Closes NVIDIA-NeMo#4495.

### Cause

`GuiCoordinateRunRequest` declares `metadata`
(`resources_servers/gui_coordinate/app.py:39`), but
`GuiCoordinateVerifyResponse` did not. `verify()` builds its response
from `**body.model_dump(...)`, so `metadata` arrived as a keyword the
response model didn't declare. `BaseVerifyResponse` keeps pydantic's
default `extra="ignore"`, so the field was dropped. The simple agent
returns the `/verify` JSON as the rollout row, so the saved row had no
`metadata`. The server has done this since it was added in NVIDIA-NeMo#2332; the
README line came later in NVIDIA-NeMo#2377. The committed
`data/example_rollouts.jsonl` from NVIDIA-NeMo#2332 shows it too: all 5 input rows
have `metadata`, and none of the 5 rollout rows do.

### Fix

Declare `metadata: Optional[dict[str, Any]] = None` on
`GuiCoordinateVerifyResponse`. `verify()` already passes the request's
value in, so nothing else changes. Downstream, the simple agent and
`image_tools_agent` both validate the `/verify` JSON with
`extra="allow"`, and rollout collection writes the `/run` result as the
row, so the field reaches `rollouts.jsonl`.

Alternatives not taken:
- **Make the response inherit `GuiCoordinateVerifyRequest`**, as 16
servers do. That would also echo `max_dist`, which the README doesn't
promise. Declaring only the documented field keeps the diff to what the
README says.
- **Change the README to say `metadata` is 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
NVIDIA-NeMo#2332 and still lacks `metadata`; regenerating it needs a GPU run of the
example and would replace all five model outputs.

Test: `test_verify_passes_metadata_through` calls `verify()` 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, from
`resources_servers/gui_coordinate`:

```bash
python -m pytest tests -q -rf --tb=short
```

```text
tests/test_app.py::TestApp::test_verify_passes_metadata_through FAILED   [100%]
tests/test_app.py:117: in test_verify_passes_metadata_through
    assert result["metadata"] == metadata
E   KeyError: 'metadata'
FAILED tests/test_app.py::TestApp::test_verify_passes_metadata_through - KeyE...
=================== 1 failed, 12 passed, 1 warning in 3.23s ====================
```

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 `/verify` control checks pass; it fails only on
saved-output metadata:

```text
FAIL   167.2s  five independent GUI screenshots follow documented coordinate scoring and preserve output metadata
  - documented metadata pass-through: saved CLI rollout 0
saved rollout rows with metadata: 0/5
row keys: _ng_environment_server, _ng_result_type, _ng_rollout_index, _ng_task_index, agent_ref, distance,
  expected_answer, extracted_x, extracted_y, failure_kind, failure_reason, mask_sample, response,
  responses_create_params, reward
```

### After the fix

Gym `40767fa54` (this branch), same command:

```text
tests/test_app.py::TestApp::test_verify_passes_metadata_through PASSED   [100%]
======================== 13 passed, 1 warning in 2.85s =========================
```

Same QA case, same model and inputs:

```text
PASS   162.3s  five independent GUI screenshots follow documented coordinate scoring and preserve output metadata
saved rollout rows with metadata: 5/5, each equal to its input row's metadata
e.g. {"fixture_id": "button", "target_label": "Create report", "source": "independent gui_coordinate GUI fixtures"}
```

### Validation

- `pytest` in `resources_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::TestSchemaPresence` and
`tests/unit_tests/test_ray_opt_out.py`: 21 passed.
- `pre-commit run --all-files`: passed, no changes.
- QA testcase `gui_coordinate` (5 independent GUI screenshots,
Qwen/Qwen3-VL-8B-Instruct on one H100): before 0/1 (fails on `documented
metadata pass-through`), after 1/1. The rows went through
`gui_coordinate_environment_server` (`legacy_agent`), so the relay path
is covered.
- Rollout evidence: the QA run above is a real 5-row rollout with the
README commands; all 5 saved rows carry their input's `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 `/verify` controls still score 1.0, 0.25 and 0.0 where
expected, and each control response now includes `metadata`.

### Compatibility

Rollout rows from `gui_coordinate` gain a top-level `metadata` key: the
row's dict, or `null` when the input row has none. Rewards, metrics, and
other fields are unchanged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: qiaochuz <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants