Repository navigation
feat: remove config fields the launchers always fill - #4910
Closed
mikasenghaas wants to merge 6 commits into
Closed
mikasenghaas wants to merge 6 commits into
mikasenghaas wants to merge 6 commits into
Conversation
This was referenced Dec 2, 2026
A shared [monitors.file] block passed only its path down. Its other settings (trace_sample, live, chunk_bytes, ...) never reached the trainer or the orchestrator, which kept their defaults without a warning. Propagate every FileMonitorConfig field. A resolved rl.json dumps every shared leaf, defaults included, so a re-load saw those defaults as values that conflict with a component's own setting. [ckpt] with [orchestrator.ckpt] rollouts = true already failed to re-load this way, and the file monitor fields would have too. A shared value equal to its class default now never conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uv run inference was both the public entrypoint (a router plus an engine, or a SLURM job) and the bare engine that each SLURM rank runs. EngineConfig now holds the fields that one engine process reads, and InferenceConfig extends it with the router, deployment and SLURM fields. The new `engine` script serves one EngineConfig without a router, and the per-rank SLURM launches use it. EngineConfig ignores unknown keys, so it reads any inference config, including the existing per-rank and P/D role JSON. InferenceConfig still rejects unknown keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SLURM writers now keep only the engine fields in the per-rank and P/D role files that `engine` reads. EngineConfig then rejects unknown keys and CLI flags like every other config. dump_rl_components and dump_pd_components are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The config audit found values that rl and sft drop or overwrite without a word. Each now fails, is honored, or is derived: - rl: a single-node orchestrator.env_worker_pool_replicas hung the run (the local launcher starts one pool per source); a multi-node value that differs from the inference node count was replaced. - rl, sft: inference.weight_broadcast was overwritten by the shared transport; an explicit inference.vllm.data_parallel_size that does not fill the inference GPUs was replaced; a larger max_lora_rank was lowered to the LoRA rank. - sft: inference.deployment, slurm and dry_run were ignored. - rl: resume set only on trainer and orchestrator left the launcher treating the run as fresh, which deleted its rollouts. The shared resume now derives from the trainer's, and the launcher reads the trainer's checkpoint directory. - Frozen models sent the run's admin token to external endpoints. - Eval sources dropped sampling.logprobs. - The SFT online-eval control API shared port 8040 with the trainer. - Multi-node SFT online evals could not set inference_metrics_roles. - Full optimizer offload warned about a max_norm the user never set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikasenghaas
force-pushed
the
fix/config-overrides
branch
from
December 2, 2026 22:05
a3d5f43 to
2d30c55
Compare
mikasenghaas
force-pushed
the
feat/narrow-public-configs
branch
from
December 2, 2026 22:05
478ed50 to
9aca55b
Compare
rl and sft nested the full orchestrator and inference configs, so their public surface held fields the launcher always fills. A user could set them, and the launcher then rejected or replaced the value. Each component config now extends the public section that the entrypoint nests, and adds only the launcher-filled fields: EngineSection EngineConfig(EngineSection) + weight_broadcast, pd_* ServingSection sft [inference]: engine + router, backend_port InferenceSection rl [inference]: + deployment InferenceConfig + slurm, output_dir, dry_run (and EngineConfig) OrchestratorSection OrchestratorConfig + env_worker_pool_replicas RLConfig.orchestrator_config/inference_config and SFTConfig.inference_config build the component configs, keeping which fields the user set. dump_rl_components and the writers use them, so the component JSON is unchanged. The removed keys now fail as unknown keys instead of with a launcher-specific error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sft [eval] block accepted model, weight_broadcast, broadcasts_dir, max_steps, output_dir, log and monitors, but the sft launcher always overwrote them. [eval] now takes SFTOnlineEvalSection, and SFTOnlineEvalConfig adds the launcher-filled fields. LogConfig keeps level and json_logging. Only the processes that read interval and log_data get them (PeriodicLogConfig, SupervisedLogConfig). rl's shared [wandb] drops offline, which no component read. inference.backend_port is now None by default and follows server.port + 100 unless set. Also fix stale docstrings and remove a dead W&B check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikasenghaas
force-pushed
the
feat/narrow-public-configs
branch
from
December 2, 2026 22:19
9aca55b to
2768cbe
Compare
mikasenghaas
force-pushed
the
fix/config-overrides
branch
from
December 2, 2026 22:33
a647625 to
787e6f2
Compare
Member
Author
|
Folded into #4909, which now holds the whole public/component section split. |
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. Some public config keys look settable, but the launcher always overwrites them or no process reads them. A user who sets them gets no error and no effect. For example,
[eval] max_stepsin ansftconfig is replaced with the trainer's value, and[orchestrator.log] log_datais never read.Idea. Remove these keys from the public schema, so that setting one fails as an unknown key. Each process keeps its complete config. The public block is a narrower base class that the complete config extends.
inference.backend_portdefaults toNoneand followsserver.port + 100. An explicit value still wins. Before, a customserver.portkept the backend on 8100.log,seq_len,weight_broadcast,rollout_transport,deployment; trainer and env worker pooloutput_dir; P/D vLLM overrides;nixl_nic_affinity;router_ttl_s. A dead W&B check is removed.TokenizerConfiginto shared blocks) and deduplication of theShared*blocks. Later PRs in the stack handle them.Breaking
Each key below now fails as an unknown key. Delete it from the config. No key had an effect before.
sft[eval]model,weight_broadcast,broadcasts_dir,max_steps,resume_step,output_dir,log,monitorslog.intervalon the trainer, sft trainer, inference and env worker pool blockslog.log_dataoutside[trainer.log]ofsft[wandb] offlinetrainer.wandb.offline/orchestrator.wandb.offline.inference.backend_portis not removed. Its default changes from8100toserver.port + 100, which is the same value for the default port.Verification
Unit suite on 2768cbe (rebased onto the section split in #4909): 823 passed, 50 failed, 111 errors. The failures and errors are the same set as on the base
fix/config-overrides. They need GPU packages or verifiers tasksets that the macOS venv lacks. The 16 new tests all pass. The mutation table below ran again on 2768cbe.backend_portonly when a router is settest_backend_port_follows_the_server_port_unless_set:assert None == 9100sft.evaltyped asSFTOnlineEvalConfigagaintest_sft_eval_block_has_no_fields_the_launcher_fills: 6 failed,DID NOT RAISE ValidationErrorTrainerLogConfigextendsPeriodicLogConfigtest_log_blocks_hold_only_the_fields_their_process_reads: 2 failedofflineback on the rl shared[wandb]test_rl_has_no_shared_wandb_offline:DID NOT RAISE ValidationErrorMerge order
#4899 → #4901 → #4905 → #4909 → this PR. Each PR is stacked on the one before it. Merge in order, and rebase each next PR onto
mainafter a squash merge.The k8s operator imports
prime_rl.configs.inference. PrimeIntellect-ai/model-factory-iac#3889 makes it read both paths. Merge it after this stack.🤖 Generated with Claude Code
Note
Medium Risk
Breaking change for configs that set formerly ignored keys; runtime behavior is unchanged when users only set supported fields, but validation errors will surface on upgrade.
Overview
Public schemas no longer expose config keys that launchers always fill or no process reads, so mistyped settings fail validation instead of being silently ignored.
SFT online eval splits into
SFTOnlineEvalSection(user[eval]block) andSFTOnlineEvalConfig(launcher-spawned process). Fields likemodel,weight_broadcast,broadcasts_dir,max_steps,resume_step,output_dir,log, andmonitorsare only on the latter; the launcher builds that config explicitly inbuild_online_eval_config.Logging uses a narrower hierarchy: base
LogConfig(level,json_logging);PeriodicLogConfigaddsintervalfor orchestrator, eval, and online eval;SupervisedLogConfigaddslog_datafor the SFT trainer only. Trainer, engine, and env worker pool log blocks no longer acceptintervalor misplacedlog_data.RL shared W&B drops
monitors.wandb.offlinefromSharedWandbConfigand removes propagation ofoffline; docs note shared mode needs a live W&B server.Inference sets
backend_portdefault toNoneand derivesserver.port + 100whenever unset (including bare-engine / no-router), not only when a router is present.Docstrings and docs are aligned (backend port wording, W&B offline, router TTL with spill, P/D overrides scope,
seq_len/weight_broadcastpropagation, env pooloutput_dir). 16 new unit tests lock in backend port derivation, eval field rejection, log block shapes, and missing sharedwandb.offline.Reviewed by Cursor Bugbot for commit 478ed50. Bugbot is set up for automated code reviews on this repo. Configure here.