Repository navigation
fix: config values that the rl and sft launchers mishandle - #4917
Open
mikasenghaas wants to merge 1 commit into
Open
mikasenghaas wants to merge 1 commit into
mikasenghaas wants to merge 1 commit into
Conversation
- Frozen models sent the run's admin token to external endpoints. - Eval sources silently dropped sampling.logprobs; now an error. - The SFT online-eval control API shared port 8040 with the trainer. - Multi-node SFT online evals could not set inference_metrics_roles, because the admin URLs come from the launcher at runtime. - Full optimizer offload warned about a max_norm the user never set. - rl: resume set only on trainer and orchestrator left the launcher treating the run as fresh, which deleted its rollouts. The shared resume now falls back to the trainer's, and the launcher reads the trainer's checkpoint directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Why. An audit of the rl and sft configs found six values that the launchers mishandle. Some are silent, and two can hurt a run: a frozen model receives the run's admin token, and a run that resumes only through
[trainer]/[orchestrator]loses its rollouts.Idea. Each value now fails loudly, is honored, or is derived correctly.
FrozenModelConfig.admin_token_varPRIME_RL_ADMIN_TOKEN: readiness checks sent the run's admin token to external teacher endpointsNonesampling.logprobsSamplingConfig, so prime-rl cannot remove it[eval.control]port[control]on the same nodeOnlineEvalControlConfig)[eval] inference_metrics_roles, multi-nodeadmin_base_urlonly at runtimeadmin_base_urlis setoptim.max_normwith full optimizer offloadresumeset only on[trainer]and[orchestrator]resume, treated the run as fresh and cleaned every step directoryresumefalls back to the trainer's. The launcher readstrainer.ckptfor the checkpoint directoryprime_rl.configs.*paths. Whichever lands second rebases.Breaking
sampling.logprobsnow fails validation. Remove the key: evals record no sampler logprobs. No checked-in config sets it.admin_token_varset explicitly on its block.[eval.control] portto keep a different port.Verification
Each fix has a unit test in
tests/unit/test_configs.py. On 9877d63, all six fail when their fix is removed:FrozenModelConfig.admin_token_var = Nonetest_frozen_models_get_no_admin_tokenfailssampling.logprobschecktest_eval_sources_reject_sampler_logprobsfailsOnlineEvalControlConfigon[eval]test_online_eval_control_does_not_share_the_trainer_control_portfailstest_online_eval_roles_wait_for_launcher_admin_urlsfailsmax_normwarning only when explicittest_full_offload_warns_only_about_an_explicit_max_normfailsresumefalls back to the trainer'stest_rl_resumes_when_only_the_components_set_resumefails🤖 Generated with Claude Code
Note
Medium Risk
Resume and rollout cleanup behavior changes can affect resumed RL runs; frozen-model admin token and eval port defaults are intentional breaking fixes for misconfiguration and security leakage.
Overview
Fixes six config values that rl and sft launchers previously mishandled—some silently, two with real run impact.
Frozen external teachers default
FrozenModelConfig.admin_token_vartoNoneso readiness checks no longer send the run's admin token to third-party endpoints; endpoints that need auth must setadmin_token_varexplicitly.RL resume propagates
trainer.resumeonto the sharedresumewhen only component blocks set it, so resume cleanup keeps rollouts instead of treating the run as fresh. The entrypoint now reads checkpoint output fromtrainer.ckptrather than a top-levelckptblock.SFT online eval gets
OnlineEvalControlConfigon port 8042 (trainer control stays 8040).inference_metrics_rolesis validated againstadmin_base_urlonly when that list is present, since multi-node SLURM fills it at runtime.Orchestrator eval sources with
sampling.logprobsnow fail validation (eval does not record sampler logprobs). Full optimizer offload still clearsmax_norm, but the gradient-clipping warning fires only whenoptim.max_normwas explicitly set.Unit tests in
test_configs.pycover each behavior.Reviewed by Cursor Bugbot for commit 9877d63. Bugbot is set up for automated code reviews on this repo. Configure here.