Skip to content

[rl] Print validation reward on the console by default - #5473

Draft
felipemello1 wants to merge 1 commit into
mainfrom
felipemello1/bugfix-metrics/3-console-validation-reward
Draft

felipemello1 wants to merge 1 commit into
mainfrom
felipemello1/bugfix-metrics/3-console-validation-reward

Conversation

@felipemello1

@felipemello1 felipemello1 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary (human-written)

Agent details

TLDR: By default the validation console line never shows the validation reward, because it looks up validation/reward/_mean but the key is validation_reward/_mean. This PR renames the two default patterns.

The default validation console patterns named validation/reward/_mean and _max, which match no key, so the reward never printed, and this PR's patterns use the logged name validation_reward.

Problem

  1. compute_rollout_metrics(prefix="validation") logs the reward as validation_reward, with sub-keys validation_reward/_mean, validation_reward/_max and so on.
  2. MetricsProcessor.Config.console_log_keys_validation defaults to validation/reward/_mean and validation/reward/_max, which match no key.
  3. Recipes that keep the default (alphabet_sort, search_r1) print no reward on the validation console line. The recipes that set their own list already use validation_reward/_mean.

Solution

  1. Rename the two default patterns to validation_reward/_mean and validation_reward/_max.
  2. The other defaults (validation/response_length/mean, timing/validate) already match their keys and don't change.

Results
MetricsProcessor.log(is_validation=True) on compute_rollout_metrics output for 2 rollouts with rewards 1 and 0:

before: Validation | Step:  0  timing/validate: 1.50
after:  Validation | Step:  0  validation_reward/_mean: 0.50  validation_reward/_max: 1.0  timing/validate: 1.50

Test plan

  • pytest tests/rl/unit_tests/cpu/test_metrics.py: 77 passed.
  • The console check above.
  • pre-commit run on the changed file.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 18, 2026
The default console_log_keys_validation looked up validation/reward/_mean and
validation/reward/_max, but compute_rollout_metrics logs validation_reward/_mean
and validation_reward/_max, so the default validation console line never showed
the reward.
@felipemello1
felipemello1 force-pushed the felipemello1/bugfix-metrics/3-console-validation-reward branch from beb2930 to 57eebec Compare November 12, 2026 06:18
@felipemello1
felipemello1 changed the base branch from felipemello1/bugfix-metrics/2-span-pairs-while-compiling to main November 12, 2026 06:18

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