Prhub

#7148 [ci] fix: update Ascend nightly CI

原始 PR 作者 Mengyuyang 合并时间 2026-07-25 17:11 文件变更 2 提交数 1 评论 1 代码增减 +3 / -3

执行摘要

修复 Ascend 夜间 CI 的依赖安装步骤

根据 PR body 中的截图,Ascend 夜间 CI 出现错误。PR 作者在 body 中明确说明 'Fix ascend nightly CI error',并附上了 CI 失败的截图(图中显示的错误与安装过程相关)。

本 PR 属于常规 CI 维护,不包含架构或功能变更,无需精读。但可以标记为 Ascend 夜间 CI 修复的参考 commit。

讨论亮点

Review 由 wucong25 审核并批准(APPROVED),未留下评论,无进一步讨论。

实现拆解

  1. 移除冗余依赖安装(.github/workflows/nightly_ascend.yml):在三个 jobs 的 Install the current repository 步骤中,删除了 pip install -r requirements-npu.txt 和 uv pip install -r requirements-npu.txt 命令。这些依赖可能已有预装的镜像或基础环境覆盖,重复安装导致冲突或失败。

  2. 增加 Megatron 配置项(tests/special_npu/quick_start/run_qwen3_0_6b_megatron_sglang_ascend.sh):在 ACTOR 数组中添加了 actor_rollout_ref.actor.megatron.vanilla_mbridge=True,以适配 Megatron 桥接模式的配置要求,可能为修复测试脚本启动参数不完整的问题。

文件 模块 状态 重要度
.github/workflows/nightly_ascend.yml CI 配置 modified 3.02
tests/special_npu/quick_start/run_qwen3_0_6b_megatron_sglang_ascend.sh 测试脚本 modified 2.88

关键源码片段

tests/special_npu/quick_start/run_qwen3_0_6b_megatron_sglang_ascend.sh test-coverage

Ascend 快速启动测试脚本:新增 `vanilla_mbridge=True` 配置项,修复 Megatron 桥接模式缺失问题。

# ACTOR 参数数组中新增一行配置
ACTOR=(
    actor_rollout_ref.actor.optim.lr=5e-7
    actor_rollout_ref.actor.ppo_mini_batch_size=8
    actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=1
    actor_rollout_ref.actor.strategy=megatron
    actor_rollout_ref.actor.megatron.pipeline_model_parallel_size=2
    actor_rollout_ref.actor.megatron.tensor_model_parallel_size=2
    actor_rollout_ref.actor.megatron.expert_model_parallel_size=1
    actor_rollout_ref.actor.megatron.vanilla_mbridge=True # 新增:启用 vanilla Megatron 桥接
    actor_rollout_ref.actor.use_kl_loss=True
    actor_rollout_ref.actor.kl_loss_coef=0.001
    actor_rollout_ref.actor.kl_loss_type=low_var_kl
    actor_rollout_ref.actor.use_torch_compile=False
)

评论区精华

没有提炼出高价值讨论线程

当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。

风险与影响

移除 requirements-npu.txt 安装可能导致某些 NPU 特定依赖(如已从基础镜像中移除的包)缺失,但本次 PR 仅适用于 Ascend 夜间 CI(nightly_ascend.yml),且依赖可能已包含在 CI 镜像中,风险较低。新增的 vanilla_mbridge=True 配置项仅为测试脚本添加,不涉及核心代码,风险可控。

范围:仅影响 Ascend 夜间 CI 流程和 Ascend 相关测试脚本。
程度:低。修复 CI 错误可确保 Ascend 平台持续集成正常运转,对用户无直接影响。

CI 配置变更

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论