Replace dcu-z100 with test-safety and add test function in batch.py#79294
Replace dcu-z100 with test-safety and add test function in batch.py#79294Ray961123 wants to merge 2 commits into
Conversation
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-06-11 00:06:22
📋 Review 摘要
PR 概述:将 DCU Test job 的 runner group 从 dcu-z100 改为 test-safety,并在 python/paddle/batch.py 末尾新增 _test_batch_placeholder()。
变更范围:.github/workflows/_Linux-DCU.yml、python/paddle/batch.py
影响面 Tag:[Execute Infrastructure] [User Experience]
问题
| 级别 | 文件 | 概述 |
|---|---|---|
| 🟡 建议 | python/paddle/batch.py:87 |
将测试占位函数加入生产模块,无法作为真实测试被收集,也会污染运行时包 |
📝 PR 规范检查
标题缺少 checklist §D1 要求的 Tag;描述未使用 checklist §D2 的四段模板,且缺少“是否引起精度变化”的明确“是/否”。
标题建议(可直接复制):
[Execute Infrastructure] Switch DCU test runner group to test-safety and add batch validation
PR 描述建议(点击展开,可直接复制)
### PR Category
<!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | Distributed Strategy | Parameter Server | Communication Library | Auto Parallel | Inference | Environment Adaptation ] -->
Execute Infrastructure
### PR Types
<!-- One of [ New features | Bug fixes | Improvements | Performance | BC Breaking | Deprecations | Docs | Devs | Not User Facing | Security | Others ] -->
Improvements
### Description
<!-- Describe what you've done -->
- Replace the DCU test job runner group in `.github/workflows/_Linux-DCU.yml` from `dcu-z100` to `test-safety`.
- Add batch module validation coverage. Current diff places this as `_test_batch_placeholder()` in `python/paddle/batch.py`; it should be moved to an executable test under `test/`.
- Validation: N/A in the current diff; no executable test file is added.
### 是否引起精度变化
<!-- one of the following [ 是 | 否 ]-->
否总体评价
本轮按风险优先审查了 2 个语义变更点 / 2 个文件。DCU runner group 的替换未在本地上下文中发现绕过 required workflow 的直接问题;但 batch.py 新增的测试占位函数需要移出生产包并改为真实测试,PR 标题和描述也需要按模板补齐。
| return batch_reader | ||
|
|
||
|
|
||
| def _test_batch_placeholder(): |
There was a problem hiding this comment.
🟡 建议 这里新增的是 python/paddle 生产包里的私有函数,不会被测试框架作为用例收集,也没有调用或断言 batch() 的任何行为。
rg _test_batch_placeholder 只命中这一个定义,因此它既不能提供 PR 描述中所说的 batch 模块验证,又会把测试占位代码发布进运行时包。
建议修复方式:
删除这个占位函数,并在 test/ 下补一个真实用例,覆盖 paddle.batch 的正常分 batch、drop_last=True/False 以及非法 batch_size 抛错。
CI报告基于以下代码生成(30分钟更新一次): 1 Required任务 : 43/47 通过
2 失败详情🔴 Linux-DCU / Test — PR问题(置信度: 高)错误类型: PR问题 | 置信度: 高
关键日志:
修复建议:
关联变更: 🔴 Check — PR问题(置信度: 高)错误类型: PR问题 | 置信度: 高
关键日志:
修复建议:
关联变更: PR 描述正文,不涉及代码文件 🔴 Linux-CPU / Build and test — 环境问题(置信度: 中)错误类型: 环境问题 | 置信度: 中
关键日志:
修复建议:
关联变更: 未发现与 🔴 Coverage test — 不稳定问题(置信度: 中)错误类型: 不稳定问题 | 置信度: 中
关键日志:
修复建议:
关联变更: |
Changes
dcu-z100withtest-safetyin.github/workflows/_Linux-DCU.yml_test_batch_placeholderinpython/paddle/batch.py