Repository navigation
Conversation
compute_rollout_metrics(prefix="validation") emits the reward as validation_reward with SummaryStats, which reduces to validation_reward/_mean, validation_reward/_max, ... The default console_log_keys_validation patterns were validation/reward/_mean and validation/reward/_max, which never match, so the default validation console line never showed the reward. Use the emitted form (as the train-side default and the math examples already do) and add a test that feeds real compute_rollout_metrics output through the default config.
|
|
Contributor
|
is this review ready? |
This branch has not been deployed
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
MetricsProcessor.Config.console_log_keys_validationdefaults tovalidation/reward/_meanandvalidation/reward/_max(torchtitan/rl/observability/metrics/processor.py). Those keys are never emitted:compute_rollout_metrics(prefix="validation")(torchtitan/rl/controller.py:691) asm.Metric(f"{prefix}_reward", m.SummaryStats...). After reduction the keys arevalidation_reward/_mean,validation_reward/_max, and so on._filter_allow_list(torchtitan/rl/observability/metrics/console.py) runsre.searchfor each pattern, and neither default pattern matches any emitted key.So the default validation console line has never shown the reward. The metric backends were not affected, because they receive every key.
The train-side default already uses the emitted form (
rollout_reward/_mean). The math examples override the validation list withvalidation_reward/_mean/_max, andrl/examples/search_r1/README.mdtells users to watchvalidation_reward/_mean. The existing console tests use syntheticvalidation/reward/_meankeys, which is why they never caught the mismatch.Changes
validation_reward/_meanandvalidation_reward/_max.test_default_validation_allow_list_matches_emitted_reward_keys. It feeds realcompute_rollout_metricsoutput through the default config and asserts that both reward keys are printed.Test plan
Run on Linux x86_64 with Python 3.12, torch 2.14.0+cpu, torchmonarch 0.6.0 and torchstore at main. vLLM was installed without its CUDA dependencies.
Two parts of the suite could not run locally:
test_verifiers.pyhits a collection error because the optionalverifierspackage is not installed here. It fails the same way on main.test_muse_glimmer_renderer.pywas ignored because its tokenizer fixture downloads from the HF Hub, which this machine cannot reach.CI covers both.