已合并
[fix] 文档版本描述修改及ci脚本修改 #521
刘原辰创建于 10 天前
[fix] 文档版本描述修改及ci脚本修改 #521
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 刘原辰 的贡献)atomgit-bot
10 天前 评论:
10 天前 评论:
变更摘要
本 PR 主要解决三个问题:修复 CI 脚本 .ci/unit_test.sh 中上游测试失败导致本仓测试被跳过的缺陷,使脚本在收集上游测试结果后继续执行本仓单元测试并输出完整汇总;同时修正文档中 inductor-npu-ext 安装步骤的版本兼容性说明,以及 quickstart.md 中默认模型配置描述与实际 run_train.sh 脚本默认值不一致的问题。
主要改动
- CI 脚本不再因上游测试失败而提前退出:
run_upstream_ut函数中原有的exit $exit_code被替换为将退出码保存到变量UPSTREAM_UT_EXIT_CODE并return 0,确保上游测试失败后仍能继续执行本仓测试。 - 新增本仓单元测试退出码捕获:原本直接运行的
pytest tests/unit_tests改为通过条件判断捕获退出码至TORCHTITAN_NPU_UT_EXIT_CODE,使脚本能够同时获取上游和本仓两部分的测试结果。 - 新增测试结果汇总输出:增加
echo "Unit test summary: upstream=${UPSTREAM_UT_EXIT_CODE}, torchtitan-npu=${TORCHTITAN_NPU_UT_EXIT_CODE}"汇总行,便于开发者一目了然地查看两部分测试状态。 - 退出码优先级调整:脚本最终退出逻辑改为优先返回上游测试退出码(若非零),否则返回本仓测试退出码,保持上游失败的信号不被掩盖。
- 文档内容修正:更新
inductor-npu-ext安装说明以指明兼容版本或 commit,并修正quickstart.md中默认模型配置描述,使其与run_train.sh脚本实际默认的qwen3模型一致。


atomgit-bot
10 天前 评论:
10 天前 评论:
10 天前 添加了label:cann-cla/yes
CANN-robot
10 天前 评论:
10 天前 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
For more, you also can visit HICANN
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/torchtitan-npu | ✅ zhaowei1936, xuyujun (2/2) | ✅ zhaowei1936 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
liuyuanchen1, thanks for your pull request. All authors of the commits have signed the CLA. 👍


此处折叠了57条消息 查看更多
zhaowei1936
1 天前 评论:
1 天前 评论:
/approve


1 天前 添加了label:lgtmapproved
1 天前 合入了pull request
描述
1、文档中 inductor-npu-ext 的安装步骤(从 torchair master 分支克隆安装)与版本配套表中指定的 torch_npu 2.12.0rc1 不兼容:安装后导入时报 ModuleNotFoundError: No module named 'torch_npu._inductor._aclgraph_update_plan',表明 inductor-npu-ext 代码依赖的 torch_npu 模块在 2.12.0rc1 版本中不存在,文档未指定 inductor-npu-ext 的兼容版本或 commit。
2、quickstart.md文档描述"默认配置,以16 NPU启动DeepSeek-V3.2 4层debug模型训练任务"且NOTE中说明MODULE默认为torchtitan_npu.models.deepseek_v32,但run_train.sh脚本实际默认MODULE为torchtitan_npu.models.qwen3、CONFIG为debug_qwen3_06b_single_node,文档描述与脚本实际默认值不一致,开发者按文档直接执行bash scripts/run_train.sh将运行qwen3而非文档所述的DeepSeek-V3.2
3、.ci/unit_test.sh 脚本设计问题:当上游测试失败时,run_upstream_ut 函数调用 exit $exit_code 导致整个脚本提前退出,本仓单元测试(tests/unit_tests)不会被执行。文档说明该脚本'运行全部单元测试(带 NPU patch 的 torchtitan 上游 UT + 本仓 torchtitan-npu UT)',但实际执行中任何上游测试失败都会导致本仓测试被跳过,开发者无法通过单条命令获取完整测试结果。
类型
Checklist:
feat,fix,refactor,docs,test)如何测试
文本修改。
其他信息
在这里可以添加任何与这个 Pull Request 相关的其他说明。