执行摘要
- 一句话:修复 Ascend 夜间 CI 的依赖安装步骤
- 推荐动作:本 PR 属于常规 CI 维护,不包含架构或功能变更,无需精读。但可以标记为 Ascend 夜间 CI 修复的参考 commit。
功能与动机
根据 PR body 中的截图,Ascend 夜间 CI 出现错误。PR 作者在 body 中明确说明 'Fix ascend nightly CI error',并附上了 CI 失败的截图(图中显示的错误与安装过程相关)。
实现拆解
-
移除冗余依赖安装(.github/workflows/nightly_ascend.yml):在三个 jobs 的 Install the current repository 步骤中,删除了 pip install -r requirements-npu.txt 和 uv pip install -r requirements-npu.txt 命令。这些依赖可能已有预装的镜像或基础环境覆盖,重复安装导致冲突或失败。
-
增加 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 配置;类别 infra;类型 infrastructure): CI 配置文件核心变更:移除了三个 jobs 中的 requirements-npu.txt 安装步骤,直接修复夜间 CI 错误。
tests/special_npu/quick_start/run_qwen3_0_6b_megatron_sglang_ascend.sh(模块 测试脚本;类别 test;类型 test-coverage): Ascend 快速启动测试脚本:新增 vanilla_mbridge=True 配置项,修复 Megatron 桥接模式缺失问题。
关键符号:未识别
关键源码片段
tests/special_npu/quick_start/run_qwen3_0_6b_megatron_sglang_ascend.sh
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
)
评论区精华
Review 由 wucong25 审核并批准(APPROVED),未留下评论,无进一步讨论。
风险与影响
关联脉络
- PR #7125 [ci] fix: tigger npu ci on the release branch: 同为 CI 修复,涉及 NPU 和 Ascend 相关逻辑。
- PR #7111 [doc] chore: update Ascend 950 references and disable nightly test: 涉及 Ascend 夜间 CI 的禁用,可能与本 PR 相关。
参与讨论