Skip to content

Add blocking periodic validation to async RL training - #5649

Draft
vkuzo wants to merge 1 commit into
gh/vkuzo/5/headfrom
gh/vkuzo/6/head
Draft

vkuzo wants to merge 1 commit into
gh/vkuzo/5/headfrom
gh/vkuzo/6/head

Conversation

@vkuzo

@vkuzo vkuzo commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Summary:
Add ValidationConfig.interval_steps so RL recipes can run held-out evaluation after every N optimizer steps. The default of 0 preserves start/end-only validation; steps=0 still disables evaluation, and negative intervals are rejected.

At a periodic boundary, wait for the current model-state push and generator pull to finish before evaluating. This ensures greedy held-out rollouts use the weights for the logged optimizer step, and blocks the next trainer step until evaluation completes. Keep training rollout workers running in the background. Use absolute step numbers after resume and leave the final step to the existing post-training pass so it is logged only once.

Fix the default validation console filter to match the emitted validation_reward/_mean and validation_reward/_max keys; the old slash-separated patterns hid both rewards. Document how to enable periodic validation, its blocking behavior, and the distinction between the prompt count and interval. Add CPU coverage for ordering, resume, disabled validation, invalid intervals, and visible reward logging.

Test Plan:

  • pytest -q tests/rl/unit_tests/cpu/test_trainer_loop.py tests/rl/unit_tests/cpu/test_metrics.py tests/rl/unit_tests/cpu/test_async_controller.py (129 passed).
  • black --check on the changed Python files; git diff --check.
  • Ran Qwen3-0.6B Flex on GPUs 4-7 for 10 optimizer steps with interval_steps=2. The run completed with exactly six validations at steps 0, 2, 4, 6, 8, and 10; each recorded 20 completed rollouts tagged with the corresponding policy version. Verified all six values in W&B history (run h684r6ip), including the final step-10 result.
  • Ran a 1,000-step alphabet-sort job with interval_steps=10; 101 validation entries at steps 0 through 1,000 appeared in W&B history, with 20 completed rollouts per version and no validation failures (run j3mlrbmm).

[ghstack-poisoned]
@vkuzo

vkuzo commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

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