Repository navigation
feat(nemo-gym): serve --masked-as-error, and a verifiers contract job - #415
Merged
Merged
Conversation
…mask_sample verifiers' NeMo Gym taskset, which prime-rl trains through, takes the reward from verify and records mask_sample only as a metric, so a rollout the environment failed trains as reward 0. With --masked-as-error, serve answers a masked rollout's verify with HTTP 503 and why; verifiers then fails the rollout, and prime-rl leaves failed rollouts out of the loss and out of their group's baseline. Off by default: Gym and NeMo RL read mask_sample from a normal answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st serve tst/verifiers runs vf-eval through verifiers' NeMo Gym taskset (the one prime-rl trains through) against `serve --masked-as-error` over the unit tier's bundle, with a streamed stand-in model: a played row scores 1.0, and a row the server masks comes back failed rather than scored 0. verifiers.yml runs it on verifiers 0.4.0 and on verifiers' main branch, with verifiers in a venv of its own since it pins mcp 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A folder whose config named masked_as_error, host or port crashed serve with a TypeError, the field passed twice. The command's host and port now win over the config's, and masked_as_error is on when either the flag or the config sets it. The serve test runs three ways: by default a masked rollout answers 200 with mask_sample, and with the flag or the config setting it answers 503. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Two pieces so prime-rl can train on AgentEnv bundles with verifiers as released.
serve --masked-as-error. With the flag,serveanswers verify for a rollout the environment failed with HTTP 503 and the reason, rather thanmask_sample.mask_sample.mask_samplefrom a normal answer, see no change.tst/verifiersand.github/workflows/verifiers.yml. A contract job that runsvf-evalthrough verifiers' NeMo Gym taskset againstserve.nemo-gym.ymlandtrl.yml.Why
verifiers' NeMo Gym taskset, which prime-rl trains through, takes
rewardfrom verify and recordsmask_sampleonly as a metric. So a rollout whose sandbox never came up trains as reward 0, and counts as 0 in eval means.A
/verifyHTTP error goes a different way:iter_trainable_traces(orchestrator/algo/base.py) skips failed traces.score_groupbuilds its baseline from those same traces.So the rollout is left out of the loss and out of its group's baseline.
I checked this at verifiers 0.4.0, at the commit prime-rl v0.10.0 pins (e888a719) and at main. A verifiers change that drops masked rollouts is proposed upstream in PrimeIntellect-ai/verifiers#3016; this flag doesn't depend on it.
Tests
tst/verifiers, run locally against verifiers main (6410684):serve --masked-as-error.vf-eval nemo-gym(null harness, subprocess runtime, streamed stand-in model).tst/nemo_gymserve test now runsserve --masked-as-error. A played rollout still answers 200 and 1.0, and a masked one answers 503 with the reason.tst/nemo_gym,tst/unit/trainingand the dependency guard pass with nemo-gym installed (48), and in a dev-only venv without it (the verifiers tier skips there withagentenv-capability-missing: nemo_gym_installed).vf-evalall scored 0.20, as through Gym.reset_timeout) came back[error],err 1.00,reward —with the flag. Without it they were[success]with reward 0.00.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; both previous findings are addressed.Summary
Adds opt-in HTTP 503 responses for masked rollouts and a verifiers contract job.
Reviews (2) · Last reviewed commit: "fix(nemo-gym): serve merges the written ..." · Reviewed by Greptile