Skip to content

fix ci_yq_donwload#4748

Closed
zjjlivein wants to merge 9 commits into
PaddlePaddle:developfrom
zjjlivein:fix_yq_download
Closed

fix ci_yq_donwload#4748
zjjlivein wants to merge 9 commits into
PaddlePaddle:developfrom
zjjlivein:fix_yq_download

Conversation

@zjjlivein

Copy link
Copy Markdown
Collaborator

Before submitting

  • Lint code. If there are lint issues, please format the code first.
# Install and register `pre-commit` in the project folder
pip install pre-commit && pre-commit install

# Process previous code files separately
pre-commit run --file XXXX.py
  • Add test cases into tests folder. If there are codecov issues, please add tests cases first.

PR types

PR changes

Description

@risemeup1111 risemeup1111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

代码改动仅替换 yq 下载源,我验证镜像文件可访问且版本为 Mike Farah yq v4.53.3,未发现需要阻塞合入的问题。当前还有部分 CI 在运行,建议等待完成后再合入。

  • P3 优先级:P3 非行级:PR 标题和描述不在代码 diff 中。当前标题 fix ci_yq_donwload 存在拼写错误,描述仍是模板内容,后续排查 CI 下载源变更时缺少原因和验证信息。建议将标题改成类似 fix ci yq download source,并在描述中补充:为何从 GitHub latest 切到 BOS 镜像、镜像中的 yq 版本,以及本 PR 触发的 workflow/验证结果。
Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.

@risemeup1111 risemeup1111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

新提交将 PaddleFleet 获取方式改为 BOS tarball 后又新增了 git fetch origin "$fleet_commit",这里会在当前短 SHA 上按远端 ref 查找并失败。阻塞细节和可直接应用的修改建议已放在行级评论里。

此前关于 PR 标题/描述的非阻塞建议仍未处理:标题仍是 fix ci_yq_donwload,描述仍是模板内容。

  • P3 优先级:P3 非行级:PR 标题和描述不在代码 diff 中。建议将标题改成类似 fix ci yq download source,并在描述中补充本次从 GitHub 下载切到 BOS 镜像/归档的原因、镜像版本或来源,以及本次 workflow 验证结果,便于后续定位 CI 下载链路问题。
Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.

Comment thread .github/workflows/fleet-model-test.yml Outdated
Comment on lines 170 to 172
git fetch origin "$fleet_commit"
git reset --hard $fleet_commit
git reset --hard $fleet_commit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 优先级:P1
这里会让该 job 在安装阶段失败。fleet_commit 当前由 setup.py 解析为短 SHA 4169dcea259,但 git fetch origin "$fleet_commit" 会把它当作远端 ref 去取,实际执行会报 fatal: couldn't find remote ref 4169dcea259;而解压出来的 PaddleFleet.tar 已包含该 commit 对象,直接 git reset --hard $fleet_commit 可以成功。建议去掉这次 fetch,并顺手去掉重复的 reset。

Suggested change
git fetch origin "$fleet_commit"
git reset --hard $fleet_commit
git reset --hard $fleet_commit
git reset --hard $fleet_commit

Comment thread .github/workflows/fleet-model-test.yml Outdated
Comment on lines 332 to 334
git fetch origin "$fleet_commit"
git reset --hard $fleet_commit
git reset --hard $fleet_commit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 优先级:P1
这里同样会让该 job 在安装阶段失败。fleet_commit 当前是短 SHA 4169dcea259git fetch origin "$fleet_commit" 会按远端 ref 查找并报 fatal: couldn't find remote ref 4169dcea259;本地解压出的 PaddleFleet.tar 已包含该 commit,对它直接 reset 可以成功。请移除这次 fetch 和重复的 reset。

Suggested change
git fetch origin "$fleet_commit"
git reset --hard $fleet_commit
git reset --hard $fleet_commit
git reset --hard $fleet_commit

Comment thread .github/workflows/fleet-model-test.yml Outdated
Comment on lines 628 to 629
git fetch origin "$fleet_commit"
git reset --hard $fleet_commit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 优先级:P1
这个新增的 fetch 会让 A100 job 在安装阶段失败。fleet_commit 当前是短 SHA 4169dcea259git fetch origin "$fleet_commit" 会按远端 ref 查找并报 fatal: couldn't find remote ref 4169dcea259;解压出的 PaddleFleet.tar 已包含该 commit,所以这里应直接 reset 到该 SHA。

Suggested change
git fetch origin "$fleet_commit"
git reset --hard $fleet_commit
git reset --hard $fleet_commit

@risemeup1111 risemeup1111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

复查当前提交后,之前关于 PaddleFleet 的短 SHA fetch 问题仍未修复,已有线程继续作为该问题的讨论位置;我没有重复开新评论。

另外,新提交把 PaddleFormers 下载改成 BOS 归档后仍执行 git pull/upstream fetch,当前三个 integration job 已在这段 GitHub 访问链路上失败。新的阻塞细节已放在行级评论里。

PR 标题和描述的非阻塞建议仍未处理,标题仍有拼写错误且描述仍是模板内容。

Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.

Comment thread .github/workflows/fleet-model-test.yml Outdated
Comment on lines +159 to +168
git pull
git submodule update --init --recursive --force
if [ -n "$PR_ID" ] && [ "$PR_ID" != "0" ]; then
git fetch origin pull/${PR_ID}/head
git checkout -b PR_${PR_ID} FETCH_HEAD
git remote add upstream https://github.com/PaddlePaddle/PaddleFormers.git
echo "Checking out ${BRANCH}..."
git fetch upstream ${BRANCH}:${BRANCH}
git merge ${BRANCH} --no-edit
git diff --numstat ${BRANCH} -- | awk "{print \$NF}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 优先级:P1
这组新增命令仍然会把安装阶段重新带回 GitHub 网络依赖,导致这次 H20 single-card CI 在解压 PaddleFormers.tar 后直接失败:日志里 git pullCONNECT tunnel failed, response 502。既然前面已经从 BOS 下载了 base 归档,这里不要再 git pull 或 fetch upstream;应基于本地归档分支只合入 PR ref,或者改用已包含 PR merge 结果的 BOS 归档。

可采用的本地流程形状如下,避免再次拉取 base/upstream:

          git submodule update --init --recursive --force
          if [ -n "$PR_ID" ] && [ "$PR_ID" != "0" ]; then
            git fetch origin pull/${PR_ID}/head
            git checkout -B PR_${PR_ID} FETCH_HEAD
            git merge ${BRANCH} --no-edit
            git diff --numstat ${BRANCH} -- | awk "{print \$NF}"
          else
            echo "Not in a pull_request event. Skipping PR-specific operations."
          fi

Comment thread .github/workflows/fleet-model-test.yml Outdated
Comment on lines +333 to +342
git pull
git submodule update --init --recursive --force
if [ -n "$PR_ID" ] && [ "$PR_ID" != "0" ]; then
git fetch origin pull/${PR_ID}/head
git checkout -b PR_${PR_ID} FETCH_HEAD
git remote add upstream https://github.com/PaddlePaddle/PaddleFormers.git
echo "Checking out ${BRANCH}..."
git fetch upstream ${BRANCH}:${BRANCH}
git merge ${BRANCH} --no-edit
git diff --numstat ${BRANCH} -- | awk "{print \$NF}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 优先级:P1
这里同样保留了新增的 GitHub 拉取链路,和本次 H20 multi-card 失败一致:日志显示解压 PaddleFormers.tar 后执行到 git fetch upstream ${BRANCH}:${BRANCH} 时触发 CONNECT tunnel failed, response 502。如果目标是避开 GitHub 下载不稳定,不能在 BOS 归档后再依赖 git pull/upstream fetch;请改成本地归档 + PR ref 的流程,或直接使用包含 PR merge 结果的 BOS 归档。

参考形状:

          git submodule update --init --recursive --force
          if [ -n "$PR_ID" ] && [ "$PR_ID" != "0" ]; then
            git fetch origin pull/${PR_ID}/head
            git checkout -B PR_${PR_ID} FETCH_HEAD
            git merge ${BRANCH} --no-edit
            git diff --numstat ${BRANCH} -- | awk "{print \$NF}"
          else
            echo "Not in a pull_request event. Skipping PR-specific operations."
          fi

Comment thread .github/workflows/fleet-model-test.yml Outdated
Comment on lines +642 to +651
git pull
git submodule update --init --recursive --force
if [ -n "$PR_ID" ] && [ "$PR_ID" != "0" ]; then
git fetch origin pull/${PR_ID}/head
git checkout -b PR_${PR_ID} FETCH_HEAD
git remote add upstream https://github.com/PaddlePaddle/PaddleFormers.git
echo "Checking out ${BRANCH}..."
git fetch upstream ${BRANCH}:${BRANCH}
git merge ${BRANCH} --no-edit
git diff --numstat ${BRANCH} -- | awk "{print \$NF}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 优先级:P1
A100 job 也会在这里重新访问 GitHub,当前 CI 日志已在 git fetch upstream ${BRANCH}:${BRANCH} 处失败:CONNECT tunnel failed, response 502。这抵消了前面改用 BOS PaddleFormers.tar 的目的;请移除 git pull/upstream fetch 这类 base 拉取,改为只基于本地归档和 PR ref 组装测试代码,或下载已经合并 PR 的 BOS 归档。

参考形状:

          git submodule update --init --recursive --force
          if [ -n "$PR_ID" ] && [ "$PR_ID" != "0" ]; then
            git fetch origin pull/${PR_ID}/head
            git checkout -B PR_${PR_ID} FETCH_HEAD
            git merge ${BRANCH} --no-edit
            git diff --numstat ${BRANCH} -- | awk "{print \$NF}"
          else
            echo "Not in a pull_request event. Skipping PR-specific operations."
          fi

@risemeup1111 risemeup1111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

复查当前提交后,之前关于 git pull/upstream fetch 的问题已被新的本地 base 合并流程取代;PaddleFleet 的短 SHA fetch 也改成了普通 git fetch origin,原线程可视为已被当前改动覆盖。

新的阻塞点在两个重复的安装脚本里:base_commit 只在 single-card block 中赋值,multi-card 和 A100 block 直接使用空变量执行 git merge "$base_commit",细节已放在行级评论里。

PR 标题和描述的非阻塞建议仍未处理,标题仍有拼写错误且描述仍是模板内容。

Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.

git pull --no-edit origin pull/${PR_ID}/head
git config --global user.name "PaddleCI"
git config --global user.email "paddle_ci@example.com"
echo "base_commit(来自 BOS 快照)=$base_commit"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 优先级:P1
这里会让 multi-card 安装阶段失败。这个 docker exec /bin/bash -ce 是独立 shell,前一个 job 里设置的 base_commit=$(git rev-parse HEAD) 不会带到这里;当前脚本只打印 $base_commit,随后 git merge "$base_commit" 会拿空字符串执行,报 “not something we can merge”。请像 single-card block 一样先在当前 PaddleFormers 目录内赋值。

Suggested change
echo "base_commit(来自 BOS 快照)=$base_commit"
base_commit=$(git rev-parse HEAD)
echo "base_commit(来自 BOS 快照)=$base_commit"

git pull --no-edit origin pull/${PR_ID}/head
git config --global user.name "PaddleCI"
git config --global user.email "paddle_ci@example.com"
echo "base_commit(来自 BOS 快照)=$base_commit"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 优先级:P1
A100 安装脚本同样没有给 base_commit 赋值。每个 docker exec /bin/bash -ce 都是独立 shell,single-card block 中的赋值不会继承到这里;执行到后面的 git merge "$base_commit" 时会尝试 merge 空字符串并失败。请先在当前 PaddleFormers 目录内取 BOS 快照的 HEAD。

Suggested change
echo "base_commit(来自 BOS 快照)=$base_commit"
base_commit=$(git rev-parse HEAD)
echo "base_commit(来自 BOS 快照)=$base_commit"

@risemeup1111 risemeup1111 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

复查当前提交后,multi-card 和 A100 安装脚本现在都在各自的 docker exec 中设置了 base_commit=$(git rev-parse HEAD),之前两个 P1 阻塞点看起来已解决。本轮未新增行级评论;当前 CI 仍在运行,建议等待结果完成后再合入。

  • P3 优先级:P3 非行级:PR 标题和描述不在代码 diff 中。标题仍是 fix ci_yq_donwload,描述仍为模板内容。建议将标题改为 fix CI yq download source,并在描述中补充本次切换 BOS 归档 / yq 镜像的原因、镜像版本或来源,以及本轮 workflow 验证结果。
Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.

@Paddle-CI-Bot

Copy link
Copy Markdown

PaddleFormers Log Analysis

Run #28857382935 · Attempt 1

日志分析报告

流水线名称 问题标签 修复建议 日志片段
CI_XPU / xpu_test run_xpu_cases XPU OOM 检查 ernie_vl_28b_sft.yamlmemory_size 预留配置是否因 PR 改动导致内存计算偏大;ernie_21b 在 backward 的 MoE all_gather 阶段 OOM,需降低 seq_len / micro_batch_size 或增大 pipeline_parallel_degree 报错代码

失败的测试 case:

scripts/xpu_ci/test_ernie_21b_sft.py::test_ernie_21b_sft_training
scripts/xpu_ci/test_ernie_28b_thinking_sft.py::test_ernie_28b_thinking_sft_training

根本原因分析:

两个 case 均为 XPU OOM,错误性质不同:

  • test_ernie_21b_sft_training:rank 2 在训练第 1 步之后的 backward pass 中,paddleformers/nn/moe/utils.py:all_gather_groupmoe_allgather_layer.pyernie4_5_moe/modeling.py 触发 ResourceExhaustedError: Out of memory error on XPU 2. Cannot allocate 2.500000GB memory;exit code 241(-15,被 SIGTERM 强杀)。
  • test_ernie_28b_thinking_sft_training:rank 0 在 workflow.py:223 调用 paddle.empty([memory_size], dtype=paddle.uint8) 预分配内存时直接 OOM,Cannot allocate 60.000000GB on XPU 0;exit code 1。

本 PR(#4748)仅修改了 .github/workflows/fleet-model-test.yml,将 git clone 改为从 BOS 下载 tar 包来加速代码同步,未触碰模型/训练代码。两个 OOM 均为 XPU runner(XPU-P800-02)显存不足,与代码改动无关,极可能是 runner 上存在残留进程占用显存、或 28b 模型的 memory_size 配置预留量超出单卡可用显存。

修复建议:

  1. 确认 runner 状态:登录 XPU-P800-02,执行 xpu_smibkcl-info 检查各卡显存占用,清理残留容器/进程后 rerun。
  2. ernie_28b_thinking(60GB OOM):检查 scripts/xpu_ci/config/ernie_vl_28b_sft.yamlmemory_size 字段,P800 单卡显存若为 64GB,60GB 预留本身接近上限,若其他进程占用部分显存则必然失败;建议将预留比例下调(如改为 0.85 或直接降低绝对值)。
  3. ernie_21b(MoE all_gather 2.5GB OOM):backward 阶段 MoE expert all_gather 触发,可尝试减小 micro_batch_size 或降低 seq_len,或增大 expert_parallel_degree 以减少单卡 all_gather buffer 大小。
  4. 以上均为 runner 环境问题,与本 PR 代码改动无关,建议优先 rerun 验证是否为偶发显存残留。

🔍 准确性记录:请点击评论底部 😊 图标,选择 👍(准确)或 👎(有误),将自动记录到 CI 监控系统

🔄 每次 Re-run 后自动更新

@zjjlivein zjjlivein closed this Jul 10, 2026
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