[CI] Support multi-Python version build (3.10/3.11/3.12)#7230
[CI] Support multi-Python version build (3.10/3.11/3.12)#7230EmmonsCurse wants to merge 2 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
|
/skip-ci ci_iluvatar |
fastdeploy-bot
left a comment
There was a problem hiding this comment.
🤖 AI Code Review |
2026-04-08 10:36 CST
📋 Review 摘要
PR 概述:支持多 Python 版本构建(3.10/3.11/3.12),添加 PYTHON_VERSION 参数并实现环境切换和缓存隔离
变更范围:.github/workflows/_build_linux.yml、.github/workflows/pr_build_and_test.yml
影响面 Tag:[CI]
📝 PR 规范检查
✅ 标题格式正确:[CI] Support multi-Python version build (3.10/3.11/3.12)
✅ 描述完整,包含 Motivation 和 Modifications
问题
| 级别 | 文件 | 概述 |
|---|---|---|
| 🔴 Bug | pr_build_and_test.yml:71 |
所有测试任务被注释掉 |
| 🔴 Bug | pr_build_and_test.yml:19 |
Python 3.10 构建被移除 |
| 🔴 Bug | _build_linux.yml:236 |
arctic_inference 在 3.11/3.12 不可用 |
总体评价
多 Python 版本支持的实现思路正确(环境切换、缓存隔离),但存在严重的测试缺失问题。建议在解决测试问题后再合并。
| MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData" | ||
| secrets: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| # unittest_coverage: |
There was a problem hiding this comment.
🔴 Bug 所有测试任务都被注释掉,合并后 CI 将不再运行任何测试。
unittest_coveragefour_cards_testlogprob_testpre_ce_testbase_teststable_test
这个 PR 的目标是「支持多 Python 版本构建」,但没有任何测试来验证构建产物的正确性。
建议:
- 至少为某一个 Python 版本(如 3.11)启用测试任务
- 在 PR 描述中说明测试计划
- 考虑使用矩阵构建来统一管理多版本测试
|
|
||
| build: | ||
| name: FD-Build-Linux | ||
| # build_310: |
There was a problem hiding this comment.
🔴 Bug Python 3.10 构建被注释掉,但没有说明原因。
Python 3.10 是目前最常用的版本之一,移除它的构建可能影响用户使用。
建议:
- 如果是临时禁用,请在 PR 描述中说明
- 如果计划废弃 3.10,需要提前通知用户
- 建议同时启用 build_310、build_311、build_312
| python -m pip install wheel | ||
| # Install jinja2 for custom ops code generation (required for 3.11/3.12) | ||
| python -m pip install jinja2 wheel | ||
| # Skip cp310-specific wheels for non-3.10 Python versions |
There was a problem hiding this comment.
🔴 Bug arctic_inference 只有 cp310-cp310 wheel,在 Python 3.11/3.12 上会跳过安装。
arctic_inference @ https://paddle-qa.bj.bcebos.com/ernie/arctic_inference-0.1.3-cp310-cp310-linux_x86_64.whl这可能导致:
- 某些功能在 3.11/3.12 上不可用
- 运行时出现 ImportError
建议:
- 确认
arctic_inference是否是必须依赖 - 如果是,需要为 3.11/3.12 提供对应的 wheel
- 如果不是必须的,考虑移到 optional dependencies
Motivation
Support multi-Python version build (
3.10/3.11/3.12)Modifications
to _build_linux.ymlLD_LIBRARY_PATH/PATHin containerCCacheandpipcache by Python versionUsage or Command
N/A
Accuracy Tests
N/A
Checklist
[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]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.