已合并
打印精度对比结果 #70
xianlei2创建于 15 天前
打印精度对比结果 #70
已合并
xianlei2创建于 15 天前
xianlei2
15 天前
### 当前PR是否有AI参与: [x] 否 [ ] 是 __1. AI Agent 平台: __2. AI 模型: __3. Prompt上下文 : ### PR功能描述 / 为什么需要这个合入**: ### 该PR关联的issue *(格式为fixes #, 或者resolves #)*: fixes # ### 希望检视人员了解: ## 测试 ## 文档更新 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述:
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 xianlei2 的贡献)
Xxianlei2
15 天前 创建了 pull request,commit 3e1a313f
atomgit-bot
atomgit-bot
15 天前 评论:

变更摘要

此 PR 主要在用例执行完成后,自动收集并打印最近 20 条精度对比记录。通过在 InstanceBase 中新增 precision_records 列表收集每条用例的精度数据,在 ProfileObject 基类中定义可选的 precision_record 钩子方法,并在 ApiProfileObject 子类中实现具体的精度提取逻辑,最终在运行循环结束后调用 _print_precision_records 以表格形式输出结果。

主要改动

  • InstanceBase 新增精度记录收集与打印: 在 __init__ 中初始化 precision_records 列表,在任务结果处理时通过 self.profile_object.precision_record(task, result) 收集记录,并在主循环结束后调用 _print_precision_records(count=20) 通过 frameless_table_print 以无边框表格形式打印最近 20 条精度对比结果。
  • ProfileObject 新增 precision_record 钩子方法: 在基类中定义了返回 None 的默认实现,供需要收集精度记录的子类重写,不强制所有流程都提供精度数据。
  • ApiProfileObject 重写 precision_record 实现精度提取: 对 None 或异常类结果返回 None 跳过;对有效结果通过 getattr 获取 precision_statusprecision 属性,构造 (testcase_name, precision, precision_status) 三元组返回。
likedislike
atomgit-bot
atomgit-bot
15 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
15 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
15 天前 评论:

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


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/ops-test-kit wangrui_, 陈琦 (2/2) wangrui_, 陈琦 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
此处折叠了105条消息 查看更多
CANN-robotCANN-robot成员
8 天前 添加了label:approved
Xxianlei2
8 天前 修改标题为 “打印精度对比结果”,原标题为“aclnn打印精度对比结果”
chenqi317成员
8 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
8 天前 添加了label:lgtm
CANN-robotCANN-robot成员
8 天前 合入了pull request