-
improvement(prime-rl-configs): expose RL component serialization from the config package (#4082)
released this
2026-10-14 04:44:52 +00:00 The k8s launcher (and potentially prime CLI for client side config
validation) needs to serialize validated RL configs using the selected
schema without importing runtime launchers. Expose
dump_rl_components()from the CPU config package and reuse it in the
local RL launcher when writing component JSON files.The shared helper preserves schema fields and null values, retains the
existing inference launcher-field exclusions, and disables the inference
router for multi-node deployments. The launcher's JSON output behavior
stays the same.Validation: Ruff and
git diff --checkpassed on the rebased branch.
Note
Low Risk
Behavior-preserving refactor that centralizes existing JSON
serialization rules; no auth, data, or runtime wiring changes.Overview
Addsdump_rl_components()to the CPU-onlyprime-rl-configs
package so validated RL configs can be split into
trainer/orchestrator/inference dicts without importing launchers or
writing files—for k8s and client-side validation.The helper reuses
dump_resolved_config(JSON with explicit nulls),
applies the same inference exclusions (deployment,slurm,
output_dir,dry_run), and setsinference["router"]toNonefor
multi-node deployments.RLConfigis referenced only under
TYPE_CHECKINGto keep the slim package lightweight.The local RL launcher’s
write_subconfigsnow loops over
dump_rl_components()instead of inlining that logic; output paths and
JSON shape are unchanged (docstring updated from TOML to JSON).Reviewed by Cursor Bugbot for commit
499aa13b77eda37fc2435d9e22c5f1f3cb44f88c. Bugbot is set up for automated
code reviews on this repo. Configure
here.Downloads