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


Pull Request已成功合入, 合并人@CANN-robot
(感谢 xianlei2 的贡献)atomgit-bot
15 天前 评论:
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_status和precision属性,构造(testcase_name, precision, precision_status)三元组返回。


atomgit-bot
15 天前 评论:
15 天前 评论:
15 天前 添加了label:cann-cla/yes
CANN-robot
15 天前 评论:
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
/approveor/lgtm- Commenting
/approveimplies 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. 👍


此处折叠了105条消息 查看更多
8 天前 添加了label:approved
8 天前 添加了label:lgtm
8 天前 合入了pull request