Open
【11月贡献大赛-缺陷修复】fix(pypto-precision-compare): [Bug] prevent cross-checkpoint parse bleed, guard None tolerance crash, and handle empty/UTF-8 logs in plot_accuracy.py #7336
【11月贡献大赛-缺陷修复】fix(pypto-precision-compare): [Bug] prevent cross-checkpoint parse bleed, guard None tolerance crash, and handle empty/UTF-8 logs in plot_accuracy.py #7336
Open
liuhongweiAdd on 3 hours ago
liuhongwei
liuhongwei
3 hours ago

关联 Issue

  • 无(社区自测发现的脚本缺陷修复)

改动说明

  • 修复 skills/optimization/pypto-precision-compare/scripts/plot_accuracy.py 中 parse_checkpoints() 在当前检查点缺失 Actual: 时越界吞并后续检查点数据的问题(扫描上界限定到下一个检查点起始行)。
  • 强制使用 matplotlib.use('Agg') 并在保存后 plt.close(fig) 适配无头环境与避免内存泄漏;优雅兼容缺失 Tolerance:(图表中置为 np.nan,汇总展示 N/A 与 UNKNOWN,不再触发 TypeError)。
  • 以 UTF-8 读取日志文件,捕获 OSError 且在未提取到有效检查点时返回退出码 1。
  • 新增回归单元测试 skills/optimization/pypto-precision-compare/tests/test_plot_accuracy.py。

改动类型

自检清单

测试结果

python -m pytest -q skills/optimization/pypto-precision-compare/tests/test_plot_accuracy.py
# 3 passed in 3.61s
likedislike
Merge blocked
ascend-robotascend-robotCollaborators
3 hours ago Added label: ascend-cla/yes
ascend-robot
ascend-robotCollaborators
3 hours ago 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.


PR Approval Progress

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
sig-model-agent ❌ (0/2)(You can also ask: 花新宇, 焦泽昱, cookieyyds, 顾梦沁, 胡晓曼) ❌ (0/1)(You can also ask: 花新宇, 林泽毅, 刘磊, 顾梦沁, 陈少宏)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

liuhongwei-2026, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike