Skip to content

[CI] Improve error log grep by excluding pytest_*_error.log noise#7612

Open
EmmonsCurse wants to merge 1 commit intoPaddlePaddle:release/2.5from
EmmonsCurse:fix_grep_error_25
Open

[CI] Improve error log grep by excluding pytest_*_error.log noise#7612
EmmonsCurse wants to merge 1 commit intoPaddlePaddle:release/2.5from
EmmonsCurse:fix_grep_error_25

Conversation

@EmmonsCurse
Copy link
Copy Markdown
Collaborator

Motivation

The original log scanning command captures all files containing "error", including pytest_*_error.log, which often introduces duplicated or noisy results. This makes it harder to identify the actual root cause from CI logs.

To improve signal-to-noise ratio and make log inspection more efficient, these redundant files should be excluded.

Modifications

  • Added a log prefix message for clarity:
    • echo ">>> grep error in ${log_dir}"
  • Updated grep command to exclude pytest-generated error logs:
    • Added --exclude="pytest_*_error.log"
  • Improved readability and effectiveness of CI log analysis.

Usage or Command

N/A

Accuracy Tests

N/A

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 24, 2026

Thanks for your contribution!

@EmmonsCurse
Copy link
Copy Markdown
Collaborator Author

/skip-ci ci_iluvatar
/skip-ci ci_hpu
/skip-ci build_xpu

Copy link
Copy Markdown

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Code Review | 2026-04-24 17:18:47

📋 Review 摘要

PR 概述:在 CI 脚本中通过 --exclude 参数过滤 pytest_*_error.log 文件,降低 grep 错误日志时的噪音干扰
变更范围:CI 脚本(scripts/run_gpu_4cards.shscripts/run_pre_ce.sh
影响面 TagCI

📝 PR 规范检查

本 PR 目标分支为 release/2.5(非 develop),根据规范,此类 PR 应为从 develop 分支 cherry-pick 而来,标题需加 [Cherry-Pick] 前缀并附上对应 develop 分支的原 PR 编号。

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

  • [Cherry-Pick][CI] Improve error log grep by excluding pytest_*_error.log noise (#XXXX)

请将 #XXXX 替换为对应 develop 分支合入的原 PR 编号。

此外,PR 描述 Modifications 中提到:

"Added a log prefix message for clarity: echo ">>> grep error in ${log_dir}""

但查看两个文件的 diff,该 echo 语句均以上下文行(无 + 前缀)出现,说明该行在本次 PR 之前已存在,本次 PR 并未新增该语句。建议修正描述,避免误导 reviewer。

问题

级别 文件 概述
🟡 建议 PR 标题 目标分支为 release/2.5,缺少 [Cherry-Pick] 前缀和原 PR 编号
❓ 疑问 PR 描述 Modifications 中称新增了 echo 日志前缀,但 diff 显示该行早已存在,描述有误

总体评价

代码变更本身简洁合理,--exclude="pytest_*_error.log" 在 GNU grep 递归模式下语义正确,能有效过滤 pytest 生成的冗余错误日志文件,改善 CI 日志信噪比。需关注 PR 规范(补充 Cherry-Pick 标签与原 PR 编号)以及修正描述的准确性。

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/2.5@9826975). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff               @@
##             release/2.5    #7612   +/-   ##
==============================================
  Coverage               ?   68.92%           
==============================================
  Files                  ?      390           
  Lines                  ?    54476           
  Branches               ?     8595           
==============================================
  Hits                   ?    37545           
  Misses                 ?    14228           
  Partials               ?     2703           
Flag Coverage Δ
GPU 68.92% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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