已关闭
optix: 统一 vLLM 命令行参数 config_position 为 run 语义 #430
jiangruitao创建于  9月16日关闭于  9月18日
jiangruitao
jiangruitao成员
9月16日 创建

背景

config_position 在 OptiX vLLM 配置注入路径中曾被多种语义混用。PR !778 引入 VllmCommand 自动渲染能力后,Scheduler.update_data_field() 未精确区分字段注入位置,可能导致环境变量字段或 MindIE 服务配置路径被误渲染为 vLLM 命令行参数。

目标

统一 OptiX vLLM 参数注入语义:

  • run:vLLM 命令行参数。
  • env:vLLM 服务子进程环境变量。
  • BackendConfig.*:MindIE 服务配置文件路径。

已完成

PR !825 已完成主链路统一:

  • Scheduler.update_data_field() 仅将 config_position == "run" 的字段传给 VllmCommand。
  • VllmConfig 新增 env 映射;VllmSimulator 初始化时合并固定环境变量。
  • 新增 [vllm.env] 配置块,支持向 vLLM 服务子进程注入固定环境变量,例如 ASCEND_RT_VISIBLE_DEVICES = "8,9"。
  • 默认容量字段 MAX_NUM_BATCHED_TOKENS、MAX_NUM_SEQS 从 env 迁移为 run,继续生成 --max-num-batched-tokens、--max-num-seqs。
  • custom_command.py 常量和注释从 cli 调整为 run 语义;默认配置模板和中文用户指南同步更新。
  • 增加混合 env / run / BackendConfig 字段、COMPILATION_CONFIG JSON 渲染、空字符串跳过和固定环境变量注入的回归测试。

PR !825 当前已合并。

验证

  • 已执行 uv run pytest tests/regression/optix/test_optimizer/test_schedule.py tests/regression/optix/test_config/test_custom_command.py tests/regression/optix/test_optimizer/test_simulator.py::TestVllmSimulator::test_fixed_env_is_injected,全部通过。
  • 已执行变更文件范围的 pre-commit;除仓库自带 Linux 版 gitleaks 在 Windows 下无法执行外,其余钩子通过。
  • 已执行 gitleaks protect --staged,通过。

遗留

  • AgentCandidateStrategy._params_to_target_field() 和 collect_context.py 搜索空间生成仍默认 env,需要后续 PR 同步迁移为 run。
  • [vllm.env] 固定值作为基础环境变量;若同名变量同时声明为 env 类型寻优字段,寻优字段会在每轮运行时覆盖固定值。

关联

  • 实现 PR:!825
  • 前置 PR:!778
likedislike
kai1949
kai1949成员
9月16日 评论:

/label add triaged
👋 您好,欢迎向 MindStudio-Modeling 提交 Issue!
我们已收到您的反馈,感谢你对开源社区的支持。🎉

📅处理时效: 维护团队将在8小时内 查看并回复您的问题(工作日)。
🔍自助查询: 在等待期间,建议您先查阅以下资料,可能已有解决方案:

📖 MindStudio-Modeling官方文档
📝 贡献者指南

请确保 Issue 描述清晰,包含复现步骤和日志,这将帮助我们更快定位问题。谢谢!

likedislike
ascend-robotascend-robot成员
9月16日 添加了label:triaged
jiangruitaojiangruitao成员
9月16日 关联了pull request:refactor(optix): 统一 vLLM 命令行参数 config_position 为 run
jiangruitaojiangruitao成员
9月17日 添加了label:feature
jiangruitaojiangruitao成员
9月17日 修改了issue 的描述
jiangruitao
jiangruitao成员
9月17日 评论:

AI 研发记录:Issue 描述更新

  • 输入事实:Issue #430 当前描述损坏;PR !825 已合并,其描述包含主链路统一、验证结果和 Agent 模式遗留项。
  • canonical/source/operation target:canonical/source/operation target 均为 Ascend/msmodeling。
  • 执行动作:根据 PR !825 重写 Issue #430 描述,标题不变。
  • 关键证据:PR !825 显示 merged、11 commits、9 changed files、CI passed;返回体显示描述更新成功。
  • 结论:主链路 run / env / BackendConfig.* 语义已在 Issue 描述中同步;Agent 模式默认 env 的迁移继续作为遗留项跟踪。
  • 用户决策:用户要求根据 PR !825 修改 Issue #430 描述。
  • 产物:https://gitcode.com/Ascend/msmodeling/issues/430
  • 下一阶段:不适用。
likedislike
jiangruitao
jiangruitao成员
9月17日 评论:

/label add resolved

likedislike
ascend-robotascend-robot成员
9月17日 添加了label:resolved
jiangruitaojiangruitao成员
9月18日 issue状态由 TODO 改变为 DONE
jiangruitaojiangruitao成员
9月18日 关闭了 issue