fix: count unscored reward components as zero in rollout metrics - #3182
Merged
Conversation
Verifiers now seeds expected reward/metric names with None when scoring starts, so a scoring failure leaves seeded-unscored entries instead of an empty dict. CustomMetrics counts unscored rewards as 0.0 (matching the scalar reward, which sums them as 0) and keeps averaging metrics over the rollouts that scored them, so all-subset per-key reward means no longer collapse onto effective when scoring errors occur. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mikasenghaas
marked this pull request as ready for review
August 3, 2026 22:23
mikasenghaas
added a commit
that referenced
this pull request
Aug 3, 2026
Keeps #3182's unscored-as-zero coverage, rekeyed onto the agent subtree. Co-Authored-By: Claude Fable 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.
Summary
Nonebefore invoking it, so a scoring failure leaves seeded-unscored entries ({"solved": null}) instead of an empty dict.CustomMetricscounts unscored (None) reward and metric entries as 0.0. Previously scoring-failed traces silently dropped out ofall/rewards/<name>/meanandall/metrics/<name>/mean, making theallsubset collapse ontoeffective— whileall/reward/meancounted the same traces as 0, so the views couldn't be reconciled. Nowallis the raw view including failures as zeros, andeffective(which excludes errored rollouts) is the clean view.aggpools need no special handling: another env's unscored traces carry their own env's keys, so they can't dilute a different env's means.deps/verifiersto the seeding commit.Uncovered on scaleswe_v1 SWE-bench Verified evals. Linear: RES-1210
Breaking
{train,eval}/*/all/{rewards,metrics}/<name>/*wandb series change meaning: traces whose scoring failed after seeding now count as 0.0 for each expected key (previously they were silently excluded, soallmatchedeffective).effectivesubsets are unchanged.Verification
uv run pytest tests/unitpasses against the bumped submodule;test_nested_metrics_and_rewardscovers the new semantics (unscored entries → 0.0 inall, dropped fromeffective; cross-env isolation).🤖 Generated with Claude Code
Note
Medium Risk
Changes the meaning of existing
all/{metrics,rewards}/<name>wandb series (breaking for dashboards); logic is localized to aggregation but affects how eval/train metrics are interpreted.Overview
CustomMetricsnow treats seeded-but-unscored entries (Nonein per-rolloutmetrics/rewardsdicts) as 0.0 when building per-key means, instead of skipping those rollouts for that key.That makes the
allwandb slice include scoring-failed traces as zeros for each expected component, aligning with scalarall/reward/meanbehavior. Theeffectivesubset is unchanged (errored rollouts are still excluded there).Unit tests in
test_nested_metrics_and_rewardswere extended for errored rollouts withNoneseeds,effectivemeans, and cross-env aggregation so unrelated env keys do not dilute another env’s component means.Reviewed by Cursor Bugbot for commit bc41c58. Bugbot is set up for automated code reviews on this repo. Configure here.