Repository navigation
feat: move config blocks to the component that uses them - #4903
Closed
mikasenghaas wants to merge 2 commits into
Closed
mikasenghaas wants to merge 2 commits into
mikasenghaas wants to merge 2 commits into
Conversation
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>
configs/inference.py splits into components/engine.py and components/router.py, which now holds the router backend blocks. configs/algorithm.py moves to components/algorithm.py, and configs/diff.py moves to utils/diff.py. The old import paths fail loudly; there are no shims. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 2, 2026
mikasenghaas
force-pushed
the
fix/shared-file-monitor
branch
from
December 2, 2026 19:36
126a6f4 to
553c6a5
Compare
Member
Author
|
Folded into #4899: both PRs are pure moves of config modules, so they share one import-path table. |
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. After #4899, the top level of
prime_rl.configsshould hold only blocks that several components share. Three modules break that rule:inference.pyholds the engine and router blocks,algorithm.pyis read only by the orchestrator, anddiff.pyis a generic utility, not a config.Idea. Move each module to the component that uses it. This PR is a pure move: no class, field or default changes.
prime_rl.configs.inference(server, vLLM, weight broadcast, KV offload, HiSparse, P/D transfer, deployment)prime_rl.configs.components.engineprime_rl.configs.inference(VllmRouterConfig,LlmdRouterConfig,RouterBackendConfig,KNOWN_SCORERS)prime_rl.configs.components.routerprime_rl.configs.algorithmprime_rl.configs.components.algorithmprime_rl.configs.diffprime_rl.utils.diffcomponents/engine.py. P/D deployment uses the KV offload configs, and a block may not import a component (test_config_layout).components/engine.pygets anEngineConfigand anenginescript in the next PR of the stack.Breaking
Python imports of the old module paths fail with
ModuleNotFoundError. There are no shims. Migrate with the table above.Verification
On e49629b, on macOS without torch or tasksets:
model_json_schema()of the 9 script configs (rl, sft, pretrain, eval, inference, trainer, orchestrator, router, env worker pool) on this branch and on the base branch. The dumps are byte-identical.from prime_rl.… import …in the repo's tracked Python files: 0 unresolved.Merge order
Merge after #4899 and #4901. This PR is stacked on #4901 (
fix/shared-file-monitor). Squash-merging the base PRs first is safe: rebase this branch ontomainafter each merge.🤖 Generated with Claude Code
Note
Low Risk
Refactor-only import and module layout changes with unchanged JSON schemas; risk is limited to external code still importing old paths.
Overview
Reorganizes the config package so shared top-level
prime_rl.configs.*only holds blocks used by multiple components.prime_rl.configs.inferenceis split: vLLM/server/deployment/KV offload live underprime_rl.configs.components.engine, andVllmRouterConfig,LlmdRouterConfig, andRouterBackendConfigmove toprime_rl.configs.components.router.prime_rl.configs.algorithmmoves toprime_rl.configs.components.algorithm.prime_rl.configs.diff(Live,Frozen,diff_config, etc.) moves toprime_rl.utils.diffsince it is generic runtime utility, not schema.All Python imports, docs (
algorithms.md,training.md), andprime-rl-configsREADME are updated to the new paths. TOML/CLI keys are unchanged; this is described as a pure move with no field or default changes.Breaking: imports from the old module paths fail with
ModuleNotFoundError— there are no compatibility shims.Reviewed by Cursor Bugbot for commit e49629b. Bugbot is set up for automated code reviews on this repo. Configure here.