Prhub

#6839 [ci] chore: fix vllm_ascend ci

原始 PR 作者 wucong25 合并时间 2026-07-01 14:50 文件变更 2 提交数 4 评论 0 代码增减 +2 / -1

执行摘要

修复 vLLM Ascend CI 测试配置

PR body 明确指出目的是“fix vllm_ascend ci”,解决当前 CI 中因缺乏种子设置导致测试结果不稳定或失败的问题。

这是一个低风险的 CI 修复 PR,值得立即合并。开发者在涉及随机性的测试中应始终设置种子以提高稳定性。

讨论亮点

无 reviewer 评论或讨论。

实现拆解

  1. CI 步骤名称调整:在 .github/workflows/vllm_ascend.yml 中,将 agent loop 测试步骤名从 "Test the latest vLLM Rollout async with agent loop" 改为 "Test the latest vLLM Rollout async with agent loop with seed 0(non deter)",在名称上明确使用了种子 0,便于识别测试模式。
  2. 测试配置增加种子:在 tests/experimental/agent_loop/test_multi_modal.py 的 init_config fixture 中,为 rollout 配置添加了 config.actor_rollout_ref.rollout.seed = 0,使测试使用固定种子,提高可重现性。
  3. 其他修改:commit 历史中曾包含对 hccl_checkpoint_engine.py 的修改(将 torch.npu.empty_cache() 替换为设备无关调用),但最终未出现在 PR 的文件变更中,说明该修改可能被分离到其他 PR 或丢弃。
文件 模块 状态 重要度
tests/experimental/agent_loop/test_multi_modal.py 多模态 modified 3.48
.github/workflows/vllm_ascend.yml CI modified 2.62

关键源码片段

tests/experimental/agent_loop/test_multi_modal.py test-coverage

多模态测试 fixture 中增加了 rollout.seed=0 配置,确保测试可复现性。

@pytest.fixture
def init_config() -> DictConfig:
    from hydra import compose, initialize_config_dir
​
    with initialize_config_dir(config_dir=os.path.abspath("verl/trainer/config")):
        config = compose(
            config_name="ppo_trainer",
            overrides=[
                "actor_rollout_ref.actor.use_dynamic_bsz=true",
                # test sleep/wake_up with fsdp offload
                "actor_rollout_ref.actor.fsdp_config.param_offload=True",
                "actor_rollout_ref.actor.fsdp_config.optimizer_offload=True",
            ],
        )
​
    model_path = os.path.expanduser("~/models/Qwen/Qwen2.5-VL-3B-Instruct")
    config.actor_rollout_ref.model.path = model_path
    config.actor_rollout_ref.rollout.name = os.environ["ROLLOUT_NAME"]
    config.actor_rollout_ref.rollout.mode = "async"
    config.actor_rollout_ref.rollout.enforce_eager = True
    config.actor_rollout_ref.rollout.prompt_length = 10240
    config.actor_rollout_ref.rollout.response_length = 4096
    config.actor_rollout_ref.rollout.n = 4
    # 新增:固定随机种子为 0,确保测试结果可重现
    config.actor_rollout_ref.rollout.seed = 0
    config.actor_rollout_ref.rollout.agent.num_workers = 2
    config.actor_rollout_ref.rollout.skip_tokenizer_init = True
​
    return config

评论区精华

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

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

风险与影响

变更极小(仅 2 个文件,共 3 行改动),且仅涉及 CI 步骤名称和测试配置的种子设置,不触及核心逻辑,回归风险极低。

直接影响 vLLM Ascend CI 的稳定性,通过固定随机种子使测试结果可复现,减少随机性导致的假阳性失败。不影响用户功能和系统性能。

低风险变更

关联 Issue

未识别关联 Issue

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

完整报告

参与讨论