Skip to content

[rl] Verifiers: only a rollout that Verifiers finished cleanly trains - #5986

Draft
felipemello1 wants to merge 1 commit into
felipemello1/verifiers-v2/2c-verifiers-0.4.1from
felipemello1/verifiers-v2/3-error-infra
Draft

felipemello1 wants to merge 1 commit into
felipemello1/verifiers-v2/2c-verifiers-0.4.1from
felipemello1/verifiers-v2/3-error-infra

Conversation

@felipemello1

@felipemello1 felipemello1 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary (human-written)

Agent details

TLDR: Only a rollout that Verifiers finished cleanly trains, with Verifiers' grade as its reward. Every other rollout gets reward None, and its status says what went wrong. Validation still grades a timed-out rollout, so a timeout counts as a failure there.

how the rollout ended                                 status                     trains
Verifiers dropped the trace                           ERROR_INFRA                no
a deadline passed, and Verifiers recorded no error    ERROR_TIMEOUT              no; validation keeps its grade
the prompt left no room for one output token          TRUNCATED_PROMPT_TOO_LONG  no
the harness failed after the policy's first token     ERROR                      no
another error, e.g. a sandbox that never started, a   ERROR_INFRA                no
  harness that failed to launch, a model call, or a
  deadline that came with an error
the policy never sampled a token                      ERROR_INFRA                no
stopped at the turn limit                             TRUNCATED_MAX_TURNS        yes
stopped by another limit, e.g. a reply out of tokens  TRUNCATED_LENGTH           yes
completed                                             COMPLETED                  yes

Stack (15 PRs, bottom first; merging a PR also merges every PR below it; this PR in bold)

# PR What
1 Run Verifiers groups in rollout workers Verifiers groups run in rollout workers; the env server stays
2 Rollouts that fail outside the policy are recorded, not trained a failed rollout no longer drops its group
3 Rollouter: least-loaded placement; the controller sizes the pool from rollouts_per_worker least-loaded placement; the pool size follows the rollouts in flight
4 Rollout workers get generate_fn and release_session_fn once, at setup; the rollouter closes each worker before it stops them generator functions at setup; workers close before they stop
5 Verifiers: each example is an installed package; its name is the taskset id taskset ids are package names
6 Verifiers: each rollout worker runs its Verifiers envs; the env server is gone the env runs in the worker (Verifiers 0.4.0)
7 Verifiers: the generation server keeps one session per trace sessions; 1 GiB requests; the renderer refuses overlong prompts
8 Verifiers 0.4.1 and renderers 0.2.0 both pins move
9 Verifiers: only a rollout that Verifiers finished cleanly trains the failure rule
10 Verifiers README: terms, concurrency and sandboxes README only: terms, concurrency, sandboxes
11 Verifiers: time each rollout's sandbox start, setup, agent, model, finalize and scoring per-phase time metrics
12 Terminal-Bench: terminal_bench_env_config takes the package that exports the taskset a package argument for launchers outside the repo
13 Spread rollout workers over the job's hosts opt-in: rollout workers on the other hosts
14 Terminal-Bench: run each task in its image's WORKDIR and grade with task.toml timeouts Terminal-Bench task fixes
15 Rollout workers, the router and the controller report their CPU and memory each step per-role CPU and memory metrics

Alone on main, not in this stack: "Validation reads each prompt at most once; ValidationConfig.steps defaults to -1" and "Terminal-Bench 35B-A3B recipe: Dist-MoE in both roles, FULL CUDA graph generators, DAPO loss".

Problem

  1. On main, a failed Verifiers rollout is ERROR or ERROR_TIMEOUT, and both train at the rubric's error_reward (0.0 in the recipes).
  2. So a sandbox that never started trains the policy toward 0, as if the policy had failed.
  3. An overlong first prompt is found by matching an error string.

Solution

  1. rollout_status reads Verifiers' fields (trace.dropped, is_timeout, ok, the last call's error, stop_condition, num_turns): the table above.
  2. VerifiersRolloutWorker.score_group sends only the "yes" rows to the rubric, plus ERROR_TIMEOUT in validation groups (negative ids). The rest get reward None, so they don't train; the rest of their group does.
  3. The worker's default rubric is RewardFromVerifiers, so no recipe sets one.
  4. Each failed rollout logs one line: its task, status, stop condition, last error and phase times. Every error, with its traceback, stays in Rollout.logs.
  5. The README's "Failed rollouts" has the table and the metrics: rollout/status_rate/<status>, rollout/unscored_rate, validation_reward_all.

You may ask:

  • Why doesn't a timed-out rollout train? A deadline cut it short, so its grade measures the deadline as much as the policy. Validation still scores it, so a policy that runs out of time scores lower there.
  • Why statuses that none of the rows trains? They say who failed: a climbing status_rate/error_timeout is mostly the policy (the log line's stop names the stage), a climbing status_rate/error_infra is the sandbox, the harness launch or the generator.

NOTE: a validation timeout before the policy's first reply has no turn to keep its grade on, so RewardFromVerifiers reads 0.0 for it. A TODO in trace_to_rollout keeps it for later.

TODOs in this PR: keep the grade of a rollout with no turns.

Test plan

pip install -e torchtitan/rl/examples/verifiers/dapo_math -e torchtitan/rl/examples/verifiers/terminal_bench
pytest tests/rl/unit_tests/cpu tests/unit_tests/cpu/components/test_renderer.py tests/unit_tests/cpu/config
# Verifiers 0.4.1: 976 passed, 1 skipped

test_rollout_status_takes_the_first_matching_row covers each row; test_only_a_rollout_that_trains_or_a_validation_timeout_keeps_its_grade covers score_group, including a group that never calls the rubric; test_a_rollout_that_does_not_train_logs_its_task_and_last_error checks the log line.

@pytorch-bot pytorch-bot Bot added the ciflow/rl label Nov 9, 2026
@felipemello1
felipemello1 added this pull request to stack #5988 November 9, 2026 21:27
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 9, 2026
@felipemello1

Copy link
Copy Markdown
Contributor Author

Reply from claude: @claude please review

@claude

claude Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @felipemello1's task in 3m 17s —— View job


Verdict: Approve -- please address the items before merging (review).

@claude claude Bot 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.

Verdict: Approve -- please address the items below before merging. Classifying failures from Verifiers' typed Error fields and the rollout's phase replaces matching on message text and is the right layer. What's left is local: the summary, the order of two status checks, and the description. A maintainer still needs to review, since rollout/types.py is core.

What this PR does. VerifiersRolloutWorker.rollout_status now sets a failed rollout's status from Verifiers' error records:

  • If the last model call was a ProviderError with status 400, the prompt was past the context.
  • A generator, interception or tunnel error is ERROR_INFRA at any turn.
  • Any failure before the first turn is ERROR_INFRA.
  • After the first turn, sandbox, tool and task failures stay ERROR (the policy's).

The generation server keeps 400 for context overflow only and returns 422 for every other bad request. A trace that Verifiers dropped gets reward None.

Example.

                                     before                       after
sandbox never booted (0 turns)       ERROR, no tokens -> group     ERROR_INFRA, siblings train
                                     dropped
generator 503 at turn 3              ERROR, trained with reward 0  ERROR_INFRA, not trained
SandboxError at turn 3               ERROR, trained                ERROR (unchanged)
harness dies on an overlong prompt   ERROR, reward 0               TRUNCATED_PROMPT_TOO_LONG,
  at turn 5                                                        reward = trace.reward
judge gives a drop verdict           trained with trace.reward     reward None, not trained

Must fix

  1. The PR description has no "Summary (human-written)". The section is empty; the author needs to fill it in.
  2. rollouter.py:420-427 -- the generator and no-turn checks run before is_timeout. If a call cut off at a deadline is recorded as a ProviderError, a timed-out rollout becomes ERROR_INFRA and escapes the timeout penalty. Please confirm which error type Verifiers 0.4.1 records there, then either reorder the checks or add a test row that pins the intended status (see inline comment).

Should consider

  • rollouter.py:277-294 -- classify a dropped trace as ERROR_INFRA in rollout_status. Training comes out the same, and it removes both the score_group override that reads Rollout.logs and the core docstring change at types.py:321.
  • rollouter.py:372-376 -- say in the description that overflow after a turn now trains differently. It used to be ERROR with reward 0; it now trains with trace.reward or truncation_reward. That is a numerics change, and the description says truncation is "unchanged".
  • rollouter.py:338 -- the release_groups comment rewrite is unrelated to this PR's concern.
Details
  • The problem is real on the base branch. Every failed trace became ERROR, and ERROR with no tokens drops the whole group in TrainingSampleBuilder. Overflow was found by searching for "maximum context length" in the error message.
  • Training outcome of each status. make_scored_group leaves ERROR_INFRA rollouts out of scoring and centering. A reward of None from score_group also keeps a rollout out of centering. So whether a dropped trace is ERROR_INFRA or has reward None, its siblings train the same way.
  • logs["dropped"] can't raise KeyError. score_group only sees rollouts built by _run_verifiers_rollout; the synthetic ERROR_INFRA rollouts for siblings that raised are filtered out before it.
  • The metric meaning moves, but the keys don't. rollout_reward and validation_reward already average only scored rollouts (controller/metrics.py:279). This PR doesn't change that code; it just leaves more Verifiers rollouts unscored.
  • New tests. They are cheap CPU tests. The real-WireTrace test guards that the Verifiers schema still has the num_turns, last_error and dropped fields this code reads.

Not verified: what Verifiers 0.4.1 records for a deadline-cancelled call, and whether its train client maps the generation server's HTTP 400 to ProviderError(status_code=400). I couldn't inspect the installed package or run the tests in this environment.

Comment on lines +277 to +294
async def score_group(
self, rollouts: list[Rollout], env_input: object
) -> list[RubricOutput]:
"""Score with the rubric; a trace that Verifiers dropped (e.g. a judge gave a drop
verdict) gets reward None, so it isn't trained.

Args:
rollouts: Sibling rollouts in one prompt group, already stepped.
env_input: the env initial input shared by the group.

Returns:
One `RubricOutput` per rollout, in input order.
"""
outputs = await super().score_group(rollouts, env_input)
return [
RubricOutput(reward=None) if rollout.logs["dropped"] is not None else output
for rollout, output in zip(rollouts, outputs, strict=True)
]

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 override makes Rollout.logs, which is a debug record, carry a control signal, and it changes the core Rollout.logs docstring (types.py:321) just to allow that. A drop verdict is already known in _run_verifiers_rollout, and it isn't the policy's doing, which is exactly what ERROR_INFRA means. If rollout_status returned ERROR_INFRA for trace.dropped is not None, training would come out the same: make_scored_group already keeps it out of scoring and centering. That lets you delete this override (~18 lines), turn test_a_trace_that_verifiers_dropped_gets_no_reward into one more row of the rollout_status parametrize, and revert the types.py docstring change. The cost is that a dropped trace shows up under status_rate/error_infra instead of completed, and log_failed_rollout logs it, with logs["dropped"] still giving the reason.

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.

Reply from claude: I kept the override. A drop verdict isn't a failure: Verifiers' judge says the trace can't be graded (e.g. the task is unanswerable), and Verifiers leaves it out of reward means and training (Trace.drop). As ERROR_INFRA, each drop would count in status_rate/error_infra and be logged by log_failed_rollout, which we read as an infra alarm. With the default rubric, training is the same either way (a rubric that compares siblings would still see the dropped one). The RolloutStatus docstring already names reward None as the way to keep a scored rollout out of training, and the Rollout.logs docstring now names this use.

Comment on lines 372 to 376
logs = verifiers_rollout_logs(verifiers_episode, trace)
if status.is_error():
log_failed_rollout(logs, group_id=group_id, rollout_id=rollout_id)
else:
elif turns:
turns[-1].env_rewards[VERIFIERS_REWARD_KEY] = trace.reward

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.

Rollouts that overflow the context after a turn now train differently, and the description doesn't list it. Before, the harness dying on an overlong later prompt was ERROR: env_rewards stayed unset, so the reward was 0.0, or error_reward if set. Now it is TRUNCATED_PROMPT_TOO_LONG, so turns[-1].env_rewards gets trace.reward (or truncation_reward). On a task graded from container state, such as Terminal-Bench, that rollout can now train with reward 1. That may well be what you want, but it changes numerics, so please state it in the description; right now it says truncation is "unchanged".

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.

Reply from claude: Solution item 4 now says it, but the "before" in your example isn't quite right, so here it is case by case. A harness that ends cleanly after the 400 was already COMPLETED and trained on its grade. Now it is TRUNCATED_PROMPT_TOO_LONG with the same grade. A harness that dies on the 400 was ERROR (error_reward=0.0). Now it is TRUNCATED_PROMPT_TOO_LONG with Verifiers' grade, 0.0, since Verifiers doesn't grade a failed run. So the in-repo recipes change the status, not the reward. A recipe that sets truncation_reward gets that reward in both cases. Item 9 no longer lists completion, or a prompt past the context, as unchanged.

Comment on lines +338 to +339
# Not fatal: `release_groups` frees the group's KV when the group ends, and
# `max_sessions` evicts the routing pin.

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 comment rewrite about release_groups has nothing to do with error classification. Please move it to the PR that introduced release_groups, or drop it here (one concern per PR).

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.

Reply from claude: Moved both comment edits (the retried-attempt TODO and the release_groups note) down to the PR that owns this code (row 6 of the stack). This PR's diff no longer touches them.

@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from 3261329 to 6ced3e2 Compare November 9, 2026 21:51
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from cad691f to 6e39e21 Compare November 9, 2026 21:51
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from 6ced3e2 to 2db56d0 Compare November 10, 2026 00:08
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 6e39e21 to 38c4768 Compare November 10, 2026 00:08
@felipemello1

Copy link
Copy Markdown
Contributor Author

Reply from claude: @claude please review

@claude

claude Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @felipemello1's task in 3m 43s —— View job


Verdict: Approve -- please address the items before merging (review).

@claude claude Bot 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.

Verdict: Approve -- please address the items below before merging. At 38c4768, failures are still classified from Verifiers' typed Error fields and the rollout's phase, which is the right layer. A test row now pins the no-turn timeout case. What's left is the description and a few still-open suggestions. A maintainer still needs to review, since rollout/types.py is core.

What this PR does. VerifiersRolloutWorker.rollout_status checks these in order, and the first match wins:

  1. The last model call was a ProviderError 400: TRUNCATED_PROMPT_TOO_LONG.
  2. A generator, interception or tunnel error: ERROR_INFRA.
  3. No turn: ERROR_INFRA.
  4. Otherwise the timeout, error and truncation rules apply as before.

The generation server now sends 400 only for context overflow and 422 for any other bad request. A failed rollout with turns keeps trace.reward under the reward key. A dropped trace gets reward None.

Example (in-repo recipes: error_reward=0.0, no truncation_reward)

                                    before                        after
sandbox boot past timeout.setup     ERROR, no tokens -> group     ERROR_INFRA, siblings train
                                    dropped
generator 503 at turn 3             ERROR, reward 0.0, trained    ERROR_INFRA, not trained
SandboxError at turn 3              ERROR, reward 0.0             ERROR, reward 0.0
400 at turn 5, harness ends clean   ERROR, reward 0.0             TRUNCATED_PROMPT_TOO_LONG,
                                                                  reward = trace.reward
judge drop verdict                  trained with trace.reward     reward None, not trained

Must fix

  1. The "Summary (human-written)" section is still empty. The author needs to fill it in.

Should consider

Each of these is still open from the last review:

  • rollouter.py:287-304 -- return ERROR_INFRA for trace.dropped is not None in rollout_status. That deletes this score_group override, which reads Rollout.logs as a control signal. It also lets you revert the core docstring change at types.py:321-322. Training comes out the same, because make_scored_group already keeps ERROR_INFRA out of scoring and centering.
  • rollouter.py:371,386-389 -- say in the description that overflow after a turn now trains on trace.reward. For the in-repo recipes it used to train on 0.0. On Terminal-Bench, a harness that ends cleanly after the 400 can now train on reward 1. Solution item 8 says truncation is "unchanged". The NOTE describes the grading, but not the change from main.
  • rollouter.py:336-339, 349-350 -- these comment rewrites about generation metadata and release_groups aren't about error classification. Move them to the PR that owns that code (one concern per PR).

Questions

  • rollouter.py:439-446 -- at a Verifiers deadline, what is the cut-off model call recorded as? If it is a ProviderError, the rollout becomes ERROR_INFRA and avoids the timeout penalty. A row with is_timeout=True plus a ProviderError after a turn would pin whichever answer you intend.
Details
  • What happens downstream. TrainingSampleBuilder (training_sample_builder.py:136-160) drops reward-None rollouts before its no-tokens group drop. So a dropped trace or an ERROR_INFRA rollout with no turns leaves its siblings trainable. A first prompt past the context (TRUNCATED_PROMPT_TOO_LONG, no tokens) still drops its group, the same as ERROR with no tokens did on the base branch.
  • Failed rollouts with turns now carry trace.reward. Both in-repo Verifiers recipes set error_reward=0.0 (verifiers_terminal_bench.py:134, verifiers_dapo_math.py:93), so their ERROR and ERROR_TIMEOUT rewards don't change.
  • Generation server. A malformed JSON body raises JSONDecodeError, which is a ValueError, so it gets a 422 and can't be read as an overflow. A generator finish_reason="abort" returns 502, which becomes ERROR_INFRA here, while the native path makes it ERROR_ABORT (token_env.py:209). I found no in-repo code that issues aborts, so I'm not listing this as a finding.
  • The 422 and the episode error: text in the ValueError at rollouter.py:358 are both in scope: they serve the classification.

Not verified: whether Verifiers 0.4.1 leaves trace.reward at 0.0 or None when it skips scoring. RewardFromVerifiers calls float() on it, which would fail on None when error_reward is unset. Also not verified: what a deadline-cancelled call is recorded as. I couldn't inspect the installed package or run the tests here.

@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from 2db56d0 to dc51fce Compare November 10, 2026 19:20
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 38c4768 to 70549c4 Compare November 10, 2026 19:20
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from dc51fce to 2e3717b Compare November 10, 2026 22:41
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 70549c4 to c7acdad Compare November 10, 2026 22:42
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from 2e3717b to 375a845 Compare November 11, 2026 01:39
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from c7acdad to 1b8647b Compare November 11, 2026 01:39
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from 375a845 to 33282f5 Compare November 11, 2026 01:53
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 1b8647b to 5308f46 Compare November 11, 2026 01:53
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from 33282f5 to ed49af9 Compare November 11, 2026 02:03
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 5308f46 to 2ddc8b2 Compare November 11, 2026 02:03
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from ed49af9 to 0326557 Compare November 11, 2026 02:48
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 2ddc8b2 to 2788cca Compare November 11, 2026 02:48
@felipemello1

Copy link
Copy Markdown
Contributor Author

Reply from claude: On the question about a Verifiers deadline. Verifiers 0.4.1 records the cut-off model call as a CancelledError on that call only (interception/server.py, the except BaseException right before record_call). It records the deadline itself as is_timeout, with no trace error (Rollout.timeout: "a stop, not a failure"). So trace.ok stays True, and the rollout is ERROR_TIMEOUT. A runtime that reports the cancel as its own error also ends as a timeout: Rollout.step checks deadline.expired() before recording a failure. Only a generator call that failed on its own (a ProviderError on the trace) beats the deadline, as ERROR_INFRA. A new row in test_rollout_status_maps_timeouts_to_error_timeout pins that order.

@claude please review

@claude

claude Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @felipemello1's task in 1m 53s —— View job


Verdict: Approve -- please address the items before merging (review).

@claude claude Bot 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.

Verdict: Approve -- please address the items below before merging. At 2788cca the earlier review items are resolved: the deadline question is answered and pinned by a test row, and the comment rewrites are gone from the diff. The new phase rule matches the native path, where any env exception is ERROR_INFRA. The only item left is the empty human-written summary. A maintainer still needs to review, since rollout/types.py is core.

What changed since the last review. After the first turn, only a trace whose last error is exactly HarnessError is ERROR now. SandboxError, TaskError, ToolsetError, an unknown type, and a failure with no recorded error all become ERROR_INFRA (the previous revision kept them ERROR). The README has a new "Which failed rollouts train" table.

Example (in-repo recipes: error_reward=0.0)

                                  base branch            this PR
SandboxError at turn 3            ERROR, reward 0.0      ERROR_INFRA, not trained
agent pkills itself at turn 3     ERROR, reward 0.0      ERROR (HarnessError), reward 0.0
deadline at turn 3, cancelled     ERROR_TIMEOUT          ERROR_TIMEOUT (trace.ok stays True)
  model call
ProviderError 503 + is_timeout    ERROR_TIMEOUT          ERROR_INFRA (new test row)
no turn, past timeout.setup       ERROR, group dropped   ERROR_INFRA, siblings train

Earlier items

  • Deadline vs. generator order: resolved. The reply explains that 0.4.1 records the cut-off call as CancelledError and leaves trace.ok True, and the (False, True, False, 1, ProviderError 503) row in test_rollout_status_maps_timeouts_to_error_timeout pins the order.
  • Dropped trace as reward None via score_group: resolved by the author's reply. RolloutStatus's TODO (types.py:139) already names a score_group override that returns None as the way to stop training a rollout, and keeping drops out of status_rate/error_infra keeps that metric usable as an infra alarm.
  • Overflow after a turn: resolved. Solution items 4 and 9 now describe the change, case by case.
  • Unrelated comment rewrites: resolved. They moved to PR 6.

Must fix

  1. The "Summary (human-written)" section is still empty. The author needs to fill it in.

Should consider

  • rollouter.py:471 -- the status table is written twice, in the rollout_status docstring and in README.md:160, with a "keep both in sync" note. If you keep the full table in one place and point to it from the other, the note can go and the two copies can't drift.
Details
  • Downstream training of each status. make_scored_group scores only is_trainable() rollouts (rollouter.py:530), so an ERROR_INFRA rollout with turns ignores the trace.reward that is now written to its env_rewards. ERROR and ERROR_TIMEOUT take error_reward before the reward fns (rubric.py:139), so the in-repo recipes (verifiers_terminal_bench.py:134, verifiers_dapo_math.py:93) still train failed rollouts on 0.0.
  • Episode-level errors. error is read only from a failed trace (None if trace.ok), so an episode EnvError on a graded trace falls through to ERROR_INFRA. The env-retry and finalize rows in the parametrize cover this.
  • Metrics. {prefix}/unscored_rate exists (controller/metrics.py:282). The averaging code is unchanged; the reward means move only because more Verifiers rollouts are now unscored, as the description says.
  • Numerics change. For Terminal-Bench, sandbox, tool and task failures after a turn used to train at 0.0 and now leave the group's centering. The description states this and gives its cost (31 of 46,106 rollouts in one run).

Not verified: whether trace.reward can be None when Verifiers skips scoring (with error_reward unset, RewardFromVerifiers would then fail on float(None)), and the Verifiers 0.4.1 behavior described in the replies. I couldn't inspect the installed package or run the tests here.

@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/2-verifiers-0.4.1 branch from 0326557 to 8ac20af Compare November 11, 2026 03:31
@felipemello1
felipemello1 changed the base branch from main to felipemello1/tb-oss/3-finite-validation November 12, 2026 07:02
@felipemello1
felipemello1 added this pull request to stack #6056 November 12, 2026 07:02
@felipemello1

Copy link
Copy Markdown
Contributor Author

Reply from claude: @claude please review. The stack is reordered: Verifiers groups in workers, then Verifiers 0.4.1, then worker placement come first (the stack table shows the new rows). It is also rebuilt with three reviewed passes: a code-style pass over every changed file, the rewritten placement docs (the VerifiersRollouter docstring and the two Verifiers READMEs; the old SVG is deleted), and the 3 newest main commits. No behavior change from the passes.

@claude

claude Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @felipemello1's task in 1m 12s —— View job


Verdict: Approve -- please address the item before merging (review).

@claude claude Bot 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.

Verdict: Approve -- please address the item below before merging. At 5365586, after the stack reorder and the style pass, rollout_status, the score_group override, the generation server's 400/422 split and the tests have the same logic as at 021610a. A maintainer still needs to review, since rollout/types.py is core.

What changed since the last review. This PR's 5 files have the same hunks as before. The style pass only touched wording. For example, the rollout_status docstring now gives the two costs as separate sentences ("A policy that breaks its sandbox before grading, or hangs the task's tests, isn't penalized. An agent the host kills ... trains as ERROR."). The placement docs, the deleted SVG and the reorder are in other rows of the stack, not in this diff.

Example. I checked that the moved base doesn't change anything this PR depends on:

what this PR relies on                          at the base branch now
BaseRolloutWorker.score_group(rollouts,         unchanged (rollout/rollouter.py:361)
  env_input)
make_scored_group scores is_trainable() only    unchanged (rollout/rollouter.py:447)
MessageEnvRolloutWorker (named in 3 comments)   class at rollout/rollouter.py:469
Rubric error_reward / truncation_reward         unchanged (rollout/rubric.py:134-142)
  short-circuit

So an ERROR_INFRA rollout or a dropped trace still stays out of centering, and the in-repo recipes (error_reward=0.0) still train ERROR and ERROR_TIMEOUT on 0.0.

Must fix

  1. The "Summary (human-written)" section is still empty. The author needs to fill it in.
Details
  • Earlier items all stay resolved at HEAD: the order of the deadline and generator checks, the dropped-trace score_group override, the overflow numerics in the description, the unrelated comment rewrites, record_timeout overwriting the stop condition, the status table written twice, and the MessageEnvRolloutWorker rename.
  • Line length. The two longest new comment lines (rollouter.py:696, test_verifiers.py:1371) are under the 120-column limit in .flake8.

Not verified: I didn't run the tests in this environment.

@felipemello1
felipemello1 removed this pull request from stack #6056 November 13, 2026 05:30
@felipemello1
felipemello1 changed the base branch from felipemello1/tb-oss/3-finite-validation to main November 13, 2026 05:31
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 5365586 to 58d0ba2 Compare November 13, 2026 05:32
@felipemello1
felipemello1 changed the base branch from main to felipemello1/tb-oss/3-finite-validation November 13, 2026 05:34
@felipemello1
felipemello1 added this pull request to stack #6091 November 13, 2026 05:34
@felipemello1
felipemello1 force-pushed the felipemello1/tb-oss/3-finite-validation branch from 8ca9c0e to eea50dd Compare November 13, 2026 06:15
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 58d0ba2 to 37eedda Compare November 13, 2026 06:15
@felipemello1

Copy link
Copy Markdown
Contributor Author

Reply from claude: @claude please review. The stack is rebased onto main (the look-aside router PR merged), and the PRs below this one are updated.

@claude

claude Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @felipemello1's task in 57s —— View job


Verdict: Approve -- please address the item before merging (review).

@claude claude Bot 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.

Verdict: Approve -- please address the item below before merging. At 37eedda (rebased onto main after the look-aside router PR merged), this PR's 5 files have the same hunks as at 5365586. rollout_status, the score_group override, the generation server's 400/422 split and the tests are unchanged. A maintainer still needs to review, since rollout/types.py is core.

What changed since the last review. Only the base moved. The diff is the same 465/67 lines across the same 5 files. Because the stack below is now on main, the code this PR depends on comes from main, not from the draft row 0.

Example. I checked the new base for the things this PR relies on:

what this PR relies on                          at the base branch now
BaseRolloutWorker.score_group(rollouts,         unchanged (rollout/rollouter.py:361)
  env_input)
make_scored_group scores is_trainable() only    unchanged (rollout/rollouter.py:447)
MessageEnvRolloutWorker (named in 3 comments)   class at rollout/rollouter.py:469
Rubric error_reward / truncation_reward         unchanged (rollout/rubric.py:134-142)
  short-circuit
generation server: the only 400 is the          yes; not ready 503, generator
  context-length check                          exceptions 500, bad responses 502
in-repo recipes set error_reward=0.0            verifiers_terminal_bench.py:134,
                                                verifiers_dapo_math.py:93

So an ERROR_INFRA rollout or a dropped trace still stays out of centering. A 400 still means only a prompt past the context. The in-repo recipes still train ERROR and ERROR_TIMEOUT on 0.0.

Must fix

  1. The "Summary (human-written)" section is still empty. The author needs to fill it in.
Details
  • Earlier items all stay resolved at HEAD: the order of the deadline and generator checks, the dropped-trace score_group override, the overflow numerics in the description, the unrelated comment rewrites, record_timeout overwriting the stop condition, the status table written twice, and the MessageEnvRolloutWorker rename.
  • The PR description no longer mentions row 0. That matches the rebase onto main.

Not verified: I didn't run the tests in this environment.

@felipemello1
felipemello1 force-pushed the felipemello1/tb-oss/3-finite-validation branch from eea50dd to d8aaf70 Compare November 13, 2026 06:40
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch 2 times, most recently from 66e32e8 to 7308386 Compare November 13, 2026 16:14
@felipemello1
felipemello1 removed this pull request from stack #6091 November 15, 2026 08:32
@felipemello1
felipemello1 force-pushed the felipemello1/tb-oss/3-finite-validation branch from 0c47cbd to ec7c8b6 Compare November 15, 2026 08:34
@felipemello1

Copy link
Copy Markdown
Contributor Author

Reply from claude: Closing. "Verifiers 0.4.1 and renderers 0.2.0: each rollout worker runs Verifiers envs" now trains only a rollout that Verifiers finished cleanly; every other rollout gets no reward, and its status says who failed. So this PR has nothing left to add. The dropped-trace case the bot raised is that PR's first row.

@felipemello1 felipemello1 reopened this Nov 15, 2026
@felipemello1
felipemello1 force-pushed the felipemello1/verifiers-v2/3-error-infra branch from 7308386 to 1df122d Compare November 15, 2026 21:43
@felipemello1
felipemello1 force-pushed the felipemello1/tb-oss/3-finite-validation branch from ec7c8b6 to 6f48047 Compare November 15, 2026 21:44
@felipemello1
felipemello1 changed the base branch from felipemello1/tb-oss/3-finite-validation to felipemello1/verifiers-v2/2c-verifiers-0.4.1 November 15, 2026 21:44
@felipemello1
felipemello1 added this pull request to stack #6109 November 15, 2026 21:44
@felipemello1 felipemello1 changed the title [rl] Verifiers: a failure outside the policy is ERROR_INFRA, not trained [rl] Verifiers: only a rollout that Verifiers finished cleanly trains Nov 15, 2026

This branch has not been deployed

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

Labels

ciflow/rl CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant