Skip to content

Add CritPt Benchmark - #1537

Closed
fsiino-nvidia wants to merge 28 commits into
mainfrom
fsiino/critpt-benchmark
Closed

fsiino-nvidia wants to merge 28 commits into
mainfrom
fsiino/critpt-benchmark

Conversation

@fsiino-nvidia

@fsiino-nvidia fsiino-nvidia commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Migrates the CritPt benchmark from nemo-skills into nemo-gym. This keeps the workflow gym-shaped (per-rollout reward flowing through the standard /verify contract).

How it works in gym:

  • Architecture - Single phase: agent runs per-rollout /run -> /verify.

  • Batching - Resources server buffers concurrent verify() calls until 70 unique problem_ids accumulate, then fires once and resolves all 70 awaiting futures with the same aggregate accuracy

  • num_repeats > 1 - Each repeat of a problem_id opens a new pending batch. N repeats -> N independent AA API calls.

  • Reward - Same as skills in that the aggregate is distributed to all batch members as their reward.

  • Headline metric - pass@k/accuracy via compute_metrics override. Numerically equal to nemo-skills' accuracy at num_repeats=1.

Test results:
With ultra mopd/step36 checkpoint:

Key metrics for critpt_benchmark_agent:
{
    "mean/reward": 0.05714285714285713,
    "mean/accuracy": 0.05714285714285713,
    "mean/timeout_rate": 0.0,
    "mean/input_tokens": 6107.028571428571,
    "mean/output_tokens": 2514.1857142857143,
    "mean/total_tokens": 8621.214285714286
}

wandb: https://wandb.ai/nvidia/fsiino-gym-dev/runs/lle631hq

Signed-off-by: Frankie Siino <[email protected]>
Signed-off-by: Frankie Siino <[email protected]>
…prompt_fpath, fix requirements path, add tests

Signed-off-by: Frankie Siino <[email protected]>
…for pydantic serialization warnings

Signed-off-by: Frankie Siino <[email protected]>
- Log per-verify buffer fill in verify()

- Add /status route for curling

Signed-off-by: Frankie Siino <[email protected]>
Signed-off-by: Frankie Siino <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@fsiino-nvidia
fsiino-nvidia marked this pull request as ready for review June 5, 2026 16:58
Comment thread benchmarks/critpt/config.yaml Resolved
Comment thread benchmarks/critpt/prepare.py Resolved
Comment thread resources_servers/critpt/app.py Resolved
Comment thread benchmarks/critpt/README.md Resolved
Comment thread benchmarks/critpt/prepare.py Resolved
- Move custom agent + example dataset into resources_server config (matches the convention for custom-agent paired benchmarks)
- Trim benchmarks/critpt/config.yaml; delete unused agent config
- Move example_metrics.json to resources_server data dir; regenerate against the curated example.jsonl
- Simplify benchmarks/critpt/data/.gitignore to *.jsonl
@copy-pr-bot

copy-pr-bot Bot commented Jun 9, 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.

- Correct reward in benchmark readme

- Correct log prefix in /status

- Distinguish flat-field vs pre-materialized jsonls

- Fix output_jsonl_fpath collision risk

Signed-off-by: Frankie Siino <[email protected]>
Signed-off-by: Frankie Siino <[email protected]>
@fsiino-nvidia

Copy link
Copy Markdown
Contributor Author

Side note: Will have to open a new PR after review + approval to satisfy DCO for 32f0860 since we can't rebase/force-push.

@cmunley1 cmunley1 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.

lgtm!


```bash
PORT=$(grep -E "critpt(_benchmark)?_resources_server.*Uvicorn running" <run.log> | head -1 | grep -oE '127\.0\.0\.1:[0-9]+' | cut -d: -f2)
curl -s http://127.0.0.1:$PORT/status

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.

This is interesting, what is the motivation? Do other envs in gym do/need this too or critpt specific?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's specific to critpt. Runs would appear stuck at "0/70 collected" because verify() waits for the full 70 to fill before firing off to AA. /status was added to get a snapshot on the batching progress. Theoretically it can be removed since there is per-verify logging now, but it's just a few lines and may be useful.

gwarmstrong pushed a commit that referenced this pull request Jun 16, 2026
Fixes DCO issue in #1537

--

Migrates the CritPt benchmark from nemo-skills into nemo-gym. This keeps
the workflow gym-shaped (per-rollout `reward` flowing through the
standard `/verify` contract).


**How it works in gym:** 
- Architecture - Single phase: agent runs per-rollout `/run` ->
`/verify`.

- Batching - Resources server buffers concurrent `verify()` calls until
70 unique `problem_id`s accumulate, then fires once and resolves all 70
awaiting futures with the same aggregate accuracy

- `num_repeats > 1` - Each repeat of a `problem_id` opens a new pending
batch. N repeats -> N independent AA API calls.

- Reward - Same as skills in that the aggregate is distributed to all
batch members as their `reward`.

- Headline metric - `pass@k/accuracy` via `compute_metrics` override.
Numerically equal to nemo-skills' `accuracy` at `num_repeats=1`.



**Test results**:
With ultra mopd/step36 checkpoint:
```
Key metrics for critpt_benchmark_agent:
{
    "mean/reward": 0.05714285714285713,
    "mean/accuracy": 0.05714285714285713,
    "mean/timeout_rate": 0.0,
    "mean/input_tokens": 6107.028571428571,
    "mean/output_tokens": 2514.1857142857143,
    "mean/total_tokens": 8621.214285714286
}
```
wandb: https://wandb.ai/nvidia/fsiino-gym-dev/runs/lle631hq

---------

Signed-off-by: Frankie Siino <[email protected]>
ritaneves pushed a commit that referenced this pull request Jun 25, 2026
Fixes DCO issue in #1537

--

Migrates the CritPt benchmark from nemo-skills into nemo-gym. This keeps
the workflow gym-shaped (per-rollout `reward` flowing through the
standard `/verify` contract).

**How it works in gym:**
- Architecture - Single phase: agent runs per-rollout `/run` ->
`/verify`.

- Batching - Resources server buffers concurrent `verify()` calls until
70 unique `problem_id`s accumulate, then fires once and resolves all 70
awaiting futures with the same aggregate accuracy

- `num_repeats > 1` - Each repeat of a `problem_id` opens a new pending
batch. N repeats -> N independent AA API calls.

- Reward - Same as skills in that the aggregate is distributed to all
batch members as their `reward`.

- Headline metric - `pass@k/accuracy` via `compute_metrics` override.
Numerically equal to nemo-skills' `accuracy` at `num_repeats=1`.

**Test results**:
With ultra mopd/step36 checkpoint:
```
Key metrics for critpt_benchmark_agent:
{
    "mean/reward": 0.05714285714285713,
    "mean/accuracy": 0.05714285714285713,
    "mean/timeout_rate": 0.0,
    "mean/input_tokens": 6107.028571428571,
    "mean/output_tokens": 2514.1857142857143,
    "mean/total_tokens": 8621.214285714286
}
```
wandb: https://wandb.ai/nvidia/fsiino-gym-dev/runs/lle631hq

---------

Signed-off-by: Frankie Siino <[email protected]>
Signed-off-by: Rita Fernandes Neves <[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.

2 participants