Merged
fix: replace Chinese log messages with English in examples #4883
wangyuchenAdd on Sep 10
fix: replace Chinese log messages with English in examples #4883
Merged
Merged fromyuchen97/gefix/example_logintocann/gedevelop
Pull Request has been successfully merged by CANN-robot.
(Thank you for wangyuchen's contribution.)Sep 10 Created pull request, commit 37dabb7b
atomgit-bot
Sep 10 Comments:
Sep 10 Comments:
变更摘要
该 PR 旨在落实"日志中不得出现中文"的规则,将 examples/ 下 es、fusion_pass、multi_stream_autotune、offline_compile_run 四个模块目录中的全部中文日志/打印消息替换为英文,同时修复了 ge_ms_autotune.py 中一处字符串拼接缺空格的缺陷,并按评审意见改进了一处译文的英文流畅度。
主要改动
examples/es/目录日志英文化: C++ 示例main.cpp中的错误与状态消息(如"GE 初始化失败"→"GE initialization failed"、"执行结束"→"Execution completed"、"错误: 未知命令"→"Error: unknown command"),以及 Python 示例run_graph()中的全部print消息(如"图运行成功"→"Graph executed successfully!"、"清理GE环境"→"Cleaning up GE environment...")均替换为英文。examples/fusion_pass/目录提示消息英文化: ES API 缺失时的RuntimeError提示(如"未找到 ge.es.math.ConcatV2"→"ge.es.math.ConcatV2 not found")与 Pass 注册打印消息("已注册"→registered、"请通过 ASCEND_GE_PY_PASS_PATH 指向本文件"→"Please add this file to ASCEND_GE_PY_PASS_PATH")翻译为英文,并补充了对 README 中'Handling Missing ES APIs (Optional)'等章节的引用。examples/multi_stream_autotune/ge_ms_autotune.py全面英文化并修复缺陷: 约 110 条日志/错误/打印消息替换为英文,结果汇总表表头与列标签(如"配置"→config、"结论"→verdict)及 docstring 同步更新;同时修复了find_compiled_om()中字符串拼接缺空格的问题(",同目录下只有上一轮的 {}"→", only leftovers from the previous run found in this directory: {}")。examples/offline_compile_run/目录日志英文化: C++ 文件的std::cerr/std::cout消息(如"失败"→failed、"系统初始化成功"→"System initialized successfully")与 Python 文件的print/f-string 消息均替换为英文,涉及build_bundle_model、run_bundle_model、build_add_model、run_add_model等脚本。


Incorrect?
atomgit-bot
Sep 10 Comments:
Sep 10 Comments:
CANN-robot
Sep 10 Comments:
Sep 10 Comments:
CANN-robot
Sep 10 Comments:
Sep 10 Comments:
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.
You can self-configure the PR merge rules for this repository. For more details, please refer to 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/ge | ✅ yangyongqiang0606, Mexyy, ClarkXie (3/2) | ✅ yangyongqiang0606 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yuchen97, thanks for your pull request. All authors of the commits have signed the CLA. 👍


65 messages are collapsed here。 See more
ClarkXie
Sep 10 Comments:
Sep 10 Comments:
/lgtm


Sep 10 Added label: lgtm
yangyongqiang
Sep 10 Comments:
Sep 10 Comments:
/approve


Sep 10 Added label: approved
Sep 10 Merged pull request
Description
Replace Chinese log/print messages with English across all
examples/subdirectories to comply with the "no Chinese in logs" rule. Also fix one implicit string concatenation bug (missing space) and improve the English fluency of a previously awkward translation.Changes
examples/es/ (183 issues, 30 files)
main.cppfiles (14 subdirs):"GE 初始化失败"→"GE initialization failed","执行结束"→"Execution completed","错误: 未知命令"→"Error: unknown command"run_graph()(16 files): all Chinese print statements replaced with fluent English ("图运行成功"→"Graph executed successfully","清理GE环境"→"Cleaning up GE environment", etc.)hccl_ep/hccl_tp:"单卡模式"/"多卡模式"→"Single-card mode"/"Multi-card mode"examples/fusion_pass/ (68 issues, 12 files)
"已注册"→"registered","请通过 ASCEND_GE_PY_PASS_PATH 指向本文件"→"Please add this file to ASCEND_GE_PY_PASS_PATH"(improved translation per review feedback)examples/multi_stream_autotune/ (73 issues, 3 files)
ge_ms_autotune.py: ~110 Chinese log/error/print messages replaced; header and column labels in output table anglicized; docstrings updatedsample_run.py: Chinese comments and print statements replacedREADME.md/README_en.md: example output section updated to match new English outputsfind_compiled_om()string concatenationexamples/offline_compile_run/ (70 issues, 10 files)
std::cerr/std::coutChinese messages replaced ("失败"→"failed","初始化成功"→"initialized successfully", etc.)Change Statistics
Change Type
How to Test
examples/and verify all output messages are in Englishexamples/multi_stream_autotune/outputs for proper formattingChecklist