任务 owner config 契约¶
任务 owner YAML 是一条已 compose 的 任务/backend/算法 路径的身份。该契约记录在 ADR-0003 Task Owner And Config Compose Contract。
Owner 路径¶
PPO 与 APPO 的 owner YAML 使用
src/unilab/conf/{ppo,appo}/task/<task>/<backend>.yaml。Off-policy 算法(SAC / TD3 / FlashSAC)各自有独立的配置树:
src/unilab/conf/<algo>/task/<task>/<backend>.yaml。
必需语义¶
使用对外的 CLI flag 切换 backend,例如
uv run train --algo ppo --task go2_joystick_flat --sim mujoco或uv run train --algo ppo --task go2_joystick_flat --sim motrix。对于 off-policy 入口,
--algo <algo>选择按算法划分的配置树;owner YAML 路径为src/unilab/conf/<algo>/task/<task>/<backend>.yaml。training.sim_backend是所选 owner YAML 内部的身份字段,而不是一个独立的 backend 切换开关。与 backend 相关的 reward、env、scene 与算法差异属于 owner YAML,而不是训练 脚本。
当任务使用奖励时,reward config 必须由 owner YAML 显式注入。
仓库中的证据¶
PPO owner 示例:
src/unilab/conf/ppo/task/go2_joystick_flat/mujoco.yamlAPPO config 根目录:
src/unilab/conf/appo/config.yamlOff-policy config 根目录:
src/unilab/conf/{sac,td3,flashsac}/config.yamlConfig 测试:
tests/config/test_config_system.py、tests/scripts/test_train_script_configs.py、tests/envs/locomotion/g1/test_g1_owner_contract.py