feat(cli): eval 在缺少目标后端 owner YAML 时回退到兄弟 owner - #1469
Merged
TATP-233 merged 2 commits intoSep 3, 2026
Conversation
… owner YAML Eval replays a trained checkpoint, so a missing owner YAML for the requested backend no longer aborts the route: the CLI reuses a sibling backend owner of the same task (same profile shape) and re-applies the requested backend via the sim2sim-allowlisted training.sim_backend override. The runtime sim2sim preflight still validates the composed config against the source run contract. Train keeps requiring the owner YAML to exist.
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.
动机
uv run eval此前要求任务必须存在所请求后端的 owner YAML(conf/<algo>/task/<task>/<sim>.yaml),缺失即拒绝。eval 只是回放训练好的 checkpoint,并不需要该后端专属的 owner 配置;train才必须要求 owner YAML 存在。改动
src/unilab/cli.py:build_command在 eval 模式下,当目标后端 owner YAML 缺失时,按SUPPORTED_SIMS顺序回退到同任务、同 profile 形态的兄弟后端 owner(新增_eval_fallback_owner),并追加 sim2sim ALLOWLIST 中的training.sim_backend=<sim>override 重新指定目标后端;回退发生时向 stderr 打印提示。train 的拒绝行为不变。mujoco_hora),避免静默加载架构不匹配的 checkpoint;没有任何同形态兄弟 owner 时仍然报错。play_interactive.py)同样支持回退:--sim传入回退 owner 名并带training.sim_backend=mujocooverride。resolve_sim2sim_config预检仍对照源 run 的contract_snapshot校验 DENYLIST 字段,policy_load_dim_guard维度守卫仍然生效。tests/test_cli.py:新增 6 个测试(eval 回退路由、train 仍拒绝、无兄弟 owner 时 eval 拒绝、profile 同形态优先、无同 profile 兄弟时拒绝、interactive viewer 回退)。en/zh_CN的3-deployment/2-sim_to_sim/7-config_guard.md生效链路一节补充 eval 回退行为。Validation
dd3bbfac(含与 base 的 merge commit,冲突已解决) 本地make test-all通过(check + test-cov + test-benchmark-smoke,exit 0;benchmark smoke 35/36 与 36/37,仅平台可选的 mlx 项跳过)。uv run pytest tests/test_cli.py tests/test_cli_runtime_requirements.py tests/test_completion.py tests/scripts/test_check_docs.py -q— 82 passed。eval --algo ppo --task microduck_sitstand_flat --sim mujoco(该任务只有mjwarp.yaml)现在路由为task=microduck_sitstand_flat/mjwarp training.sim_backend=mujoco training.play_only=true;相同参数train仍被拒绝。