Skip to content

fix: config values that the rl and sft launchers mishandle - #4917

Open
mikasenghaas wants to merge 1 commit into
mainfrom
fix/config-audit
Open

mikasenghaas wants to merge 1 commit into
mainfrom
fix/config-audit

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

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.

Field Before After
FrozenModelConfig.admin_token_var PRIME_RL_ADMIN_TOKEN: readiness checks sent the run's admin token to external teacher endpoints None
eval source sampling.logprobs Dropped Error. The field is on verifiers' SamplingConfig, so prime-rl cannot remove it
SFT [eval.control] port 8040, the same as the SFT trainer's [control] on the same node 8042 (OnlineEvalControlConfig)
SFT [eval] inference_metrics_roles, multi-node Always failed: SLURM sets admin_base_url only at runtime Checked only when admin_base_url is set
optim.max_norm with full optimizer offload Warned even when the user never set it Warns only for an explicit value
rl resume set only on [trainer] and [orchestrator] The launcher read the unset shared resume, treated the run as fresh and cleaned every step directory The shared resume falls back to the trainer's. The launcher reads trainer.ckpt for the checkpoint directory

Breaking

  • An eval source with sampling.logprobs now fails validation. Remove the key: evals record no sampler logprobs. No checked-in config sets it.
  • A frozen model endpoint that needs an admin token now needs admin_token_var set explicitly on its block.
  • The SFT online-eval control API moves from port 8040 to 8042. Set [eval.control] port to 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:

Change removed Result
FrozenModelConfig.admin_token_var = None test_frozen_models_get_no_admin_token fails
eval sampling.logprobs check test_eval_sources_reject_sampler_logprobs fails
OnlineEvalControlConfig on [eval] test_online_eval_control_does_not_share_the_trainer_control_port fails
roles check skipped without admin URLs test_online_eval_roles_wait_for_launcher_admin_urls fails
max_norm warning only when explicit test_full_offload_warns_only_about_an_explicit_max_norm fails
shared resume falls back to the trainer's test_rl_resumes_when_only_the_components_set_resume fails

🤖 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_var to None so readiness checks no longer send the run's admin token to third-party endpoints; endpoints that need auth must set admin_token_var explicitly.

RL resume propagates trainer.resume onto the shared resume when only component blocks set it, so resume cleanup keeps rollouts instead of treating the run as fresh. The entrypoint now reads checkpoint output from trainer.ckpt rather than a top-level ckpt block.

SFT online eval gets OnlineEvalControlConfig on port 8042 (trainer control stays 8040). inference_metrics_roles is validated against admin_base_url only when that list is present, since multi-node SLURM fills it at runtime.

Orchestrator eval sources with sampling.logprobs now fail validation (eval does not record sampler logprobs). Full optimizer offload still clears max_norm, but the gradient-clipping warning fires only when optim.max_norm was explicitly set.

Unit tests in test_configs.py cover each behavior.

Reviewed by Cursor Bugbot for commit 9877d63. Bugbot is set up for automated code reviews on this repo. Configure here.

- 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant