Skip to content

Replace dcu-z100 with test-safety and add test function in batch.py#79294

Open
Ray961123 wants to merge 2 commits into
PaddlePaddle:developfrom
Ray961123:fix-dcu-test-safety
Open

Replace dcu-z100 with test-safety and add test function in batch.py#79294
Ray961123 wants to merge 2 commits into
PaddlePaddle:developfrom
Ray961123:fix-dcu-test-safety

Conversation

@Ray961123

Copy link
Copy Markdown
Collaborator

Changes

  • Replace dcu-z100 with test-safety in .github/workflows/_Linux-DCU.yml
  • Add a test function _test_batch_placeholder in python/paddle/batch.py

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.ymlpython/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 标题和描述也需要按模板补齐。

Comment thread python/paddle/batch.py
return batch_reader


def _test_batch_placeholder():

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 建议 这里新增的是 python/paddle 生产包里的私有函数,不会被测试框架作为用例收集,也没有调用或断言 batch() 的任何行为。

rg _test_batch_placeholder 只命中这一个定义,因此它既不能提供 PR 描述中所说的 batch 模块验证,又会把测试占位代码发布进运行时包。

建议修复方式:
删除这个占位函数,并在 test/ 下补一个真实用例,覆盖 paddle.batch 的正常分 batch、drop_last=True/False 以及非法 batch_size 抛错。

@PaddlePaddle-bot

PaddlePaddle-bot commented Jun 11, 2026

Copy link
Copy Markdown

🤖 Paddle-CI-Agent | ci_status_monitor | 2026-06-16 21:58:08 UTC+08:00

CI报告基于以下代码生成(30分钟更新一次):
PR commit: e337ba2 | Merge base: 1430f5b (branch: develop)


1 Required任务 : 43/47 通过

总执行(rerun次数) 总任务 ✅ 通过 ❌ 失败 ⏳ 运行中 ⏸️ 等待中 跳过
78(0) 78 73 4 0 0 1
任务 错误类型 置信度 日志
Linux-DCU / Test PR问题 Job
Check PR问题 Job
Linux-CPU / Build and test 环境问题 Job
Coverage test 不稳定问题 Job

2 失败详情

🔴 Linux-DCU / Test — PR问题(置信度: 高)

错误类型: PR问题 | 置信度: 高
分析器: 通用分析(fallback)
失败用例: 无单元测试用例,失败在 runner 初始化阶段

用例 错误摘要
Set up runner self-hosted runner hook 执行 sudo 失败,后续容器未创建

关键日志:

Runner group name: 'test-safety'
Uses: PaddlePaddle/Paddle/.github/workflows/_Linux-DCU.yml@refs/pull/79294/merge
sudo: sorry, you must have a tty to run sudo
Error response from daemon: No such container: bin/bash
  • 根因摘要: DCU runner group 改为 test-safety 后初始化失败
    PR diff 将 .github/workflows/_Linux-DCU.ymlLinux-DCU / Testruns-on.groupdcu-z100 改为 test-safety。失败发生在 Set up runner,测试步骤未执行,说明新 runner group 的 job-started hook/权限环境与该 workflow 不兼容。

修复建议:

  1. test-safety 不是 DCU Test 可用 runner group,恢复为 dcu-z100;若必须切换,需先让 test-safety runner 的初始化 hook 支持非交互 sudo/容器初始化。

关联变更: .github/workflows/_Linux-DCU.ymlgroup: dcu-z100 改为 group: test-safety

🔴 Check — PR问题(置信度: 高)

错误类型: PR问题 | 置信度: 高
分析器: 通用分析(fallback)
失败用例: 无单元测试用例,失败在 PR 模板检查

用例 错误摘要
Check PR Template PR Category/PR Types 不在允许枚举中,且未填写精度影响

关键日志:

check_pr_template: False pr: 79294
PR Category should be in [...]. but now is [place `dcu-z100` with `test-safety` ...]
PR Types should be in [...]. but now is [- replace `dcu-z100` with `test-safety` ...]
必须填写是否引起精度变化
EXCODE: 7
  • 根因摘要: PR 描述未按模板填写必填字段
    当前 PR body 只有 ## Changes 列表,模板检查把变更说明内容解析成 PR Category / PR Types,导致枚举校验失败,同时精度影响字段为空。

修复建议:

  1. 按仓库 .github/PULL_REQUEST_TEMPLATE.md 更新 PR 描述,填写合法的 PR CategoryPR Types,并补充“是否引起精度变化”。

关联变更: PR 描述正文,不涉及代码文件

🔴 Linux-CPU / Build and test — 环境问题(置信度: 中)

错误类型: 环境问题 | 置信度: 中
分析器: 通用分析(fallback)
失败用例: 无单元测试用例,失败在下载/准备阶段

用例 错误摘要
Download paddle.tar.gz and merge target branch 下载 Paddle.tar.gz 后步骤返回 exit code 4,Build/Test 均未执行

关键日志:

Downloading Paddle.tar.gz
Process completed with exit code 4.
Build: skipped
Test: skipped
  • 根因摘要: CPU job 前置产物下载/准备失败
    失败发生在 Download paddle.tar.gz and merge target branch,后续 Build/Test 直接跳过;PR diff 未修改 CPU workflow 或相关构建脚本,当前证据更符合产物下载/网络/CI 准备阶段异常。

修复建议:

  1. 环境问题,请 rerun;若重跑仍失败,检查 Paddle.tar.gz 产物下载源和该 runner 的网络/权限。

关联变更: 未发现与 .github/workflows/_Linux-DCU.ymlpython/paddle/batch.py 的直接关联

🔴 Coverage test — 不稳定问题(置信度: 中)

错误类型: 不稳定问题 | 置信度: 中
分析器: 通用分析(fallback)
失败用例: 按错误类型聚类

用例 错误摘要
test_sub_graph_stable_diffusion_23_st.py::TestLayer::test_ast_prim_cinn PIR/CINN 子图测试抛 ValueError: In transformed code
test_dataset_download, test_randperm_op CTest 超时

关键日志:

66/135 Test #353: test_sub_graph_stable_diffusion_23_st .....***Failed
ERROR: test_ast_prim_cinn (__main__.TestLayer.test_ast_prim_cinn)
ValueError: In transformed code:
The following tests FAILED:
  1707 - test_dataset_download (Timeout)
  2354 - test_randperm_op (Timeout)
Process completed with exit code 8.
  • 根因摘要: Coverage 测试中既有用例失败和超时
    失败发生在 Coverage workflow 的 Test 步骤,覆盖率生成和阈值检查未执行。PR 仅在 python/paddle/batch.py 新增 _test_batch_placeholder(),未修改上述 PIR/CINN、dataset download 或 randperm 测试路径,当前证据不支持 PR 代码直接导致。

修复建议:

  1. 已知不稳定,请 rerun;若重跑复现,再分别排查 test_sub_graph_stable_diffusion_23_st.pyValueError 和两个超时用例。

关联变更: python/paddle/batch.py 新增占位函数,未发现与失败用例直接关联

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants