Skip to content

fix(ci): use test-safety runner for DCU tests#79324

Open
Ray961123 wants to merge 3 commits into
PaddlePaddle:developfrom
Ray961123:fix-dcu-test-safety-l-v1
Open

fix(ci): use test-safety runner for DCU tests#79324
Ray961123 wants to merge 3 commits into
PaddlePaddle:developfrom
Ray961123:fix-dcu-test-safety-l-v1

Conversation

@Ray961123

Copy link
Copy Markdown
Collaborator

Use the test-safety runner group for DCU tests.

PaddlePaddle-bot

This comment was marked as outdated.

@Ray961123 Ray961123 closed this Jun 16, 2026
@Ray961123 Ray961123 reopened this Jun 16, 2026

@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-16 21:23:06

📋 Review 摘要

PR 概述:将 Linux-DCU Test job 的 runner group 从 dcu-z100 切到 test-safety,同时额外改动了 python/paddle/batch.py
变更范围:GitHub Actions DCU CI、Python 顶层 API 模块
影响面 Tag[Execute Infrastructure] [User Experience]

问题

级别 文件 概述
🟡 建议 python/paddle/batch.py:86 CI runner PR 中混入无关联的 no-op __docformat__ 函数

历史 Findings 修复情况

Finding 问题 状态
F1 test-safety runner group 是否保证只包含可运行 DCU 测试的 runner? ⚠️ 仍存在

📝 PR 规范检查

PR 标题使用 fix(ci): ...,不符合 Paddle 要求的 [Tag] 标题描述 格式;PR 描述也缺少 develop 分支必填的 ### PR Category### PR Types### Description### 是否引起精度变化 四个 section。

标题建议(可直接复制):

  • [Execute Infrastructure] Use test-safety runner for DCU tests
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 ] -->
Bug fixes

### Description
<!-- Describe what you’ve done -->
Use the `test-safety` runner group for the Linux-DCU `Test` job in `.github/workflows/_Linux-DCU.yml`, replacing the previous `dcu-z100` runner group. Impact scope: DCU test job scheduling only. Validation: N/A.

### 是否引起精度变化
<!-- one of the following [ 是 | 否 ]-->

总体评价

Workflow 变更本身只触及 DCU test job 调度;历史 runner group 覆盖问题仍缺少代码侧证据证明已解决。本轮新增的 Python 源码改动与 CI 目标不一致,建议移出本 PR 后再合入。

Comment thread python/paddle/batch.py

return batch_reader

def __docformat__(**kwargs):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 建议 这个新增的 __docformat__ 函数与本 PR 的 DCU runner 调整无关,而且当前模块只通过 python/paddle/__init__.py 手工导出 batchbatch.py 自身的 __all__ 为空。

__docformat__ 通常是模块文档元数据名,这里新增一个 no-op callable 不会参与 paddle.batch 的行为修复,只会让 Python 源码变更混入 CI 配置 PR,增加 API/文档工具误判的风险。

建议修复方式:从本 PR 中移除这两行,只保留 .github/workflows/_Linux-DCU.yml 的 runner group 变更;如果确实需要修改 batch.py,请单独说明目的并补充对应验证。

@PaddlePaddle-bot

Copy link
Copy Markdown

🤖 Paddle-CI-Agent | ci_status_monitor | 2026-06-16 22:05:37 UTC+08:00

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


1 Required任务 : 16/30 通过

总执行(rerun次数) 总任务 ✅ 通过 ❌ 失败 ⏳ 运行中 ⏸️ 等待中 跳过
51(0) 51 37 2 12 0 0
任务 错误类型 置信度 日志
Check PR Template / Check PR问题:PR模板字段不合规 Job
Codestyle-Check / Pre Commit PR问题:格式化钩子修改文件 Job

2 失败详情

🔴 Check PR Template / Check — PR问题:PR模板字段不合规(置信度: 高)

分析器: 通用分析(fallback)

失败用例:

用例 错误摘要
Check PR Template PR 描述未按 Paddle PR 模板填写,Category、Types 字段被解析为正文片段,且缺少“是否引起精度变化”

关键日志:

check_pr_template: False pr: 79324
ERROR MESSAGE: PR Category should be in [...]. but now is [fety runner group for dcu tests.]
PR Types should be in [...]. but now is [t-safety runner group for dcu tests.]
必须填写是否引起精度变化
EXCODE: 7
  • 根因摘要: PR 描述未按模板填写必填字段
    PR body 当前只有一句 Use the test-safety runner group for DCU tests.,没有保留 Paddle PR 模板中的分类、类型和精度影响字段。模板检查脚本因此把正文片段误解析为 Category/Types,并以 exit code 7 失败。

修复建议:

  1. .github/PULL_REQUEST_TEMPLATE.md 更新 PR 描述,补齐合法的 PR Category、PR Types 和“是否引起精度变化”等必填项。

关联变更: PR 描述;代码变更为 .github/workflows/_Linux-DCU.ymlpython/paddle/batch.py,该失败与源码逻辑无关。

🔴 Codestyle-Check / Pre Commit — PR问题:格式化钩子修改文件(置信度: 高)

分析器: 通用分析(fallback)

失败用例:

用例 错误摘要
end-of-file-fixer, ruff-format python/paddle/batch.py 被 pre-commit 自动修改,说明提交内容未包含格式化结果

关键日志:

fix end of files.........................................Failed
- hook id: end-of-file-fixer
- files were modified by this hook
Fixing python/paddle/batch.py
ruff format..............................................Failed
- hook id: ruff-format
- files were modified by this hook
1 file reformatted
  • 根因摘要: python/paddle/batch.py 未提交格式化结果
    PR 在 python/paddle/batch.py 末尾新增 def __docformat__(**kwargs): pass,但缺少文件末尾换行并未满足 ruff-format 的空行格式。CI 中 pre_commit.sh 对该文件生成了格式 diff,因此 codestyle 失败。

修复建议:

  1. 本地执行 pre-commit run --files .github/workflows/_Linux-DCU.yml python/paddle/batch.py,提交 python/paddle/batch.py 的格式化结果;至少需要保留函数前空行并补齐文件末尾换行。

关联变更: python/paddle/batch.py 新增末尾函数;.github/workflows/_Linux-DCU.yml 被检查但日志中未显示格式失败。

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@1430f5b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
python/paddle/batch.py 50.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #79324   +/-   ##
==========================================
  Coverage           ?   50.00%           
==========================================
  Files              ?        1           
  Lines              ?        2           
  Branches           ?        0           
==========================================
  Hits               ?        1           
  Misses             ?        1           
  Partials           ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants