[No.35] feat(doctor): add config doctor and dry-run - #204
Conversation
50d2c5a to
e11fd1b
Compare
|
感谢投入!这个 PR 的问题不是功能做得不够,而是实现方向和题目本意存在较大偏差。 本题出题人原本希望复用现有参数解析链路,在 relax/utils/arguments.py 及各 backend 的 args 校验处补充一组轻量、无副作用的前置检查,让常见配置错误在 Ray、SGLang 或 GPU worker 启动前暴露;dry-run 入口只需负责执行这些校验、展示必要信息并返回正确的退出码。题目的重点并不是重新建立一套配置解析和运行时规划框架。 当前 PR 修改了 38 个文件,新增约 4.7k 行代码。除了完整的 relax/doctor/ 子系统,还引入了规则注册、Bash 子集静态解析、字段来源追踪、多阶段 fallback、独立 Launch Plan,并进一步修改了 Controller、Registry 以及 Megatron/SGLang 的参数解析路径。这个改动范围已经明显超出本题所需,也使原本只读的预检功能侵入核心运行路径,带来了与收益不成比例的 review 成本、长期维护成本和训练路径回归风险。 综上,本次评审结论为暂不通过。非常感谢您在本任务中投入的时间与精力,也期待后续按上述方向收敛方案后再次提交。 |
e11fd1b to
a43c307
Compare
@GUOGUOPOT 老师您好,感谢您指出上一版实现方向与题目本意的偏差。前两天学校的服务器出了点故障没及时回复您,不好意思。上一版对项目了解不够充分,对任务边界的理解存在偏差,过分追求不必要的完整性,给评审带来了不必要的负担,抱歉。我已按照您建议的轻量方案完成整体重写,辛苦您再次审阅。 本次主要调整如下:
分支已同步最新 https://github.com/redai-infra/Relax/actions/runs/32614825356 PR 正文已同步更新实现范围、验证命令、已知限制和回退方式。再次感谢上一轮对方向的纠正,辛苦您复审。 |
Summary
Changes
advantages: [1, 0]producer for pure fully-async topologies, including true-on-policy mode.@[start:end]slices.The implementation is limited to 9 files. It does not modify Controller, Registry, backend runtime code, placement-group creation, or worker startup. It does not introduce fallback parsing, Bash interpretation, a rule engine, or an independent Launch Plan.
Backend- and algorithm-specific validation remains in the existing validation chain, so extending a backend or algorithm does not require adding rules to a Doctor-specific monolithic function.
Verification
Environment:
main@5cec8ca1569801d835a56ac86af19babd83caa82caa00335b941de7935e1877e4a0dd66f61c0ff4fFocused Doctor tests:
PYTHONPATH=.:/path/to/Megatron-LM \ python -m pytest -q tests/entrypoints/test_doctor.py # 52 passedRelated argument, Registry, backend, data-path, and algorithm tests:
PYTHONPATH=.:/path/to/Megatron-LM \ python -m pytest -q \ tests/entrypoints/test_doctor.py \ tests/test_model_source.py \ tests/utils/test_arguments_reinforce_plus_plus.py \ tests/utils/test_arguments_rloo.py \ tests/utils/test_arguments_opd_teacher_colocate.py \ tests/utils/test_arguments_mtp_only.py \ tests/utils/test_lora_vision_scope_validation.py \ tests/utils/training/test_ppo_utils_grpo.py \ tests/utils/data/test_data_utils.py \ tests/core/test_registry_rloo.py \ tests/core/test_registry_reinforce_plus_plus.py \ tests/core/test_registry_sft.py \ tests/backends/sglang/test_arguments.py # 186 passedRepository checks:
pre-commit run --all-files git diff --check # passedGitHub CI run #726 passed:
CI evidence:
https://github.com/redai-studio/Relax/actions/runs/33600398619
Risk & Rollback
--.Checklist