| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[feature] 混部场景下支持 SGLang native launch Co-authored-by: qq_40172610<chenchaofeng5@huawei.com> # message auto-generated for no-merge-commit merge: !693 merge feature/sglang-native-launch into master [feature] 混部场景下支持 SGLang native launch Created-by: qq_40172610 Commit-by: qq_40172610 Merged-by: towncharlie Description: ## **1. 合入背景** 混部场景下,Motor 负责集群编排与实例生命周期管理,推理引擎侧更适合复用 SGLang 原生启动能力( python3 -m sglang.launch_server)。EngineServer 虽已预留 native launch 双路径,但混部实际拉起时,SGLang CLI 参数组装与并行规模解析仍有偏差,导致无法与原生引擎正确协同。 典型问题出现在混部常见的单 endpoint + DP Attention 配置(如 DeepSeek-V4-Flash:enable_dp_attention=true,且 dp_size=tp_size=local_world_size):既有 world_size=dp*local_world_size 会放大并行规模,使注册信息与真实卡数不一致,影响 native launch 正确拉起。 本 PR 修正混部相关并行配置语义与 SGLang CLI 参数组装,保证 Motor 编排与 SGLang 原生引擎拉起可协同工作;native / invasive 双路径继续保留,默认仍为 invasive。 Fixes [#458](https://gitcode.com/Ascend/MindIE-Motor/issues/458) ## **2. 修改内容** 1. **保留 native / invasive 双路径,默认 invasive**(motor/engine_server/cli/main.py) NATIVE_LAUNCH_ENABLED 默认保持 False(走 InferEndpoint invasive 拉起)。混部验证可显式置为 True,通过子进程执行 python3 -m sglang.launch_server ...;后续演进再考虑移除 invasive。 2. **修正混部并行配置语义**(motor/config/resolver.py) - 仅当 enable_dp_attention 为 True 时,world_size=local_world_size,避免 DP Attention 单 endpoint 场景被放大为 dp*local。 - 未开启 enable_dp_attention 时,保持历史语义 world_size=dp*local_world_size;该行为与 enable_multi_endpoints 解耦。 - 触发条件以 enable_dp_attention 为准(不以 enable_multi_endpoints=false 作为 world_size 折叠条件)。 3. **规范 SGLang CLI 参数组装**(motor/engine_server/core/sglang/sglang_config.py) flatten 统一 underscore,生成 CLI 时再转 hyphen;多机场景使用 node_rank,并规范 dist_init_addr / disaggregation_mode 等字段,保证 native launch 参数正确。 4. **补充 / 同步 UT** - resolver:enable_dp_attention=true 时折叠为 local_world_size;未开启时保持 dp*local(即使 enable_multi_endpoints=false 也不折叠)。 - sglang_config flatten / CLI 相关用例。 - native launch 路由:默认 invasive,以及 True/False 分支。 ## **3. 资料变更** 不涉及。 ## **4. 接口变更** 不涉及对外接口变更。行为说明: - enable_dp_attention 未开启:行为与合入前一致,world_size=dp*local_world_size。 - enable_dp_attention=true:world_size 改为等于 local_world_size(混部 DP Attention 预期行为);与 enable_multi_endpoints 取值无关。 - NATIVE_LAUNCH_ENABLED 默认仍为 False;混部启用 native 需显式打开。 ## **5. 测试结果** | 维度 | 场景/方法 | 结果 | |---|---|---| | 混部拉起 | Motor Controller/Coordinator/Engine + SGLang,DeepSeek-V4-Flash(dp=tp=16,enable_dp_attention);显式开启 native launch | 成功;日志出现 Native launch 与 sglang.launch_server;引擎 NORMAL | | 并行正确性 | 检查注册 parallel_config(enable_dp_attention=true) | world_size=local_world_size=16,与物理卡一致 | | 兼容性 | enable_dp_attention 未开启(即使 enable_multi_endpoints=false) | 保持原有 world_size=dp*local 语义 | | 推理冒烟 | /v1/chat/completions(1+1+3=) | HTTP 200,结果正确 | | UT | resolver / sglang_config / native launch 路由相关用例 | 已补充并通过 | ## **6. CheckList** [x] 代码注释完备 [x] 正确记录维测日志 [x] 是否有UT用例 [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-Motor!693 | 2 天前 | |
【Docs】补充 A5 节点标签说明与常用模型 A5 配置示例 Co-authored-by: 高鹏<gaopeng140@huawei.com> # message auto-generated for no-merge-commit merge: !609 merge a5-node-label-docs into master 【Docs】补充 A5 节点标签说明与常用模型 A5 配置示例 Created-by: weixin_63825906 Commit-by: 高鹏 Merged-by: towncharlie Description: ## **1. 合入背景** > 当前环境准备文档与 models 配置示例仅覆盖 A2/A3,缺少 A5(Atlas 850)相关说明,现场部署时无法直接参考。 Fix part of [#363](https://gitcode.com/Ascend/MindIE-Motor/issues/363) ## **2. 修改内容** 1. 在 docs/zh/user_guide/environment_preparation.md「设置节点标签」中补充 A5 / Atlas 850 Server(普通集群)打标签示例: 2. 在 examples/infer_engines/vllm/models 下为常用模型补充 A5/ 配置示例(user_config.json + env.json): ## **3. 资料变更** 涉及(用户指南节点标签章节、models 配置示例) ## **4. 接口变更** 不涉及 ## **5. 测试结果** > 服务推理正常  ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [x] 代码注释完备 [x] 正确记录维测日志 [x] 是否有UT用例 [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-Motor!609 | 17 天前 | |
[feature] 虚推(SimInference)健壮性加固 Co-authored-by: Jechin<yuzechen1@huawei.com> # message auto-generated for no-merge-commit merge: !456 merge fix/sim-inference-hardening into master [feature] 虚推(SimInference)健壮性加固 Created-by: Jechin Commit-by: Jechin Merged-by: towncharlie Description: ## **1. 合入背景** Fixes [#258](https://gitcode.com/Ascend/MindIE-PyMotor/issues/258) 虚推(SimInference)在 warmup 后失败计数、abnormal 生命周期、SGLang 误启用及 shutdown 资源释放等方面存在多处健壮性缺陷,可能导致 GET /status 长期 normal 或状态抖动,进而影响 Node Manager HeartbeatManager 的连续 abnormal 计数与 Pod 重调度。本 PR 逐项加固虚推行为并补充 UT。 ## **2. 修改内容** 1. **motor/engine_server/core/sim_inference.py**:SGLang 引擎类型运行时自动关闭虚推。 2. **sim_inference.py**:warmup 成功后将 _count_failure_flag 置为 True,空闲期失败可累计。 3. **sim_inference.py**:达到 abnormal 后退出 health_check_loop,移除循环内 auto-reset。 4. **sim_inference.py**:stop_health_check() 不再重置 abnormal 状态。 5. **sim_inference.py**:shutdown 时停止 AI Cube event、join 采样线程、关闭 HTTP client。 6. **文档与示例**:对齐 engine_server.md、config_reference.md 中虚推说明;从 SGLang 示例配置移除 health_check_config。 7. **UT**:更新 tests/engine_server/core/test_sim_inference.py、test_mgmt_endpoint.py 覆盖上述行为。 ## **3. 资料变更** - docs/zh/developer_guide/components/engine_server.md:虚推启用条件、NPU 采样指标、异常判定与 vLLM 指标过滤说明对齐实现。 - docs/zh/user_guide/deployment/k8s/config_reference.md:虚推相关字段说明微调。 - examples/infer_engines/sglang/user_config.json、user_config_pd_hetero.json:移除 SGLang 不支持的 health_check_config。 ## **4. 接口变更** 不涉及跨代码仓或客户面可见的 HTTP/API 契约变更。行为修正:GET /status 在 abnormal 后语义更稳定;SGLang 运行时强制关闭虚推(即使配置 enable_virtual_inference: true)。 ## **5. 测试结果** - bash tests/run_tests.sh:全部通过(6 warnings,与基线一致)。 - 聚焦:tests/engine_server/core/test_sim_inference.py、tests/engine_server/core/test_mgmt_endpoint.py 通过。 ## **6. CheckList** [x] 代码注释完备 [x] 正确记录维测日志 [x] 是否有UT用例 [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-PyMotor!456 | 29 天前 | |
[feature] 虚推(SimInference)健壮性加固 Co-authored-by: Jechin<yuzechen1@huawei.com> # message auto-generated for no-merge-commit merge: !456 merge fix/sim-inference-hardening into master [feature] 虚推(SimInference)健壮性加固 Created-by: Jechin Commit-by: Jechin Merged-by: towncharlie Description: ## **1. 合入背景** Fixes [#258](https://gitcode.com/Ascend/MindIE-PyMotor/issues/258) 虚推(SimInference)在 warmup 后失败计数、abnormal 生命周期、SGLang 误启用及 shutdown 资源释放等方面存在多处健壮性缺陷,可能导致 GET /status 长期 normal 或状态抖动,进而影响 Node Manager HeartbeatManager 的连续 abnormal 计数与 Pod 重调度。本 PR 逐项加固虚推行为并补充 UT。 ## **2. 修改内容** 1. **motor/engine_server/core/sim_inference.py**:SGLang 引擎类型运行时自动关闭虚推。 2. **sim_inference.py**:warmup 成功后将 _count_failure_flag 置为 True,空闲期失败可累计。 3. **sim_inference.py**:达到 abnormal 后退出 health_check_loop,移除循环内 auto-reset。 4. **sim_inference.py**:stop_health_check() 不再重置 abnormal 状态。 5. **sim_inference.py**:shutdown 时停止 AI Cube event、join 采样线程、关闭 HTTP client。 6. **文档与示例**:对齐 engine_server.md、config_reference.md 中虚推说明;从 SGLang 示例配置移除 health_check_config。 7. **UT**:更新 tests/engine_server/core/test_sim_inference.py、test_mgmt_endpoint.py 覆盖上述行为。 ## **3. 资料变更** - docs/zh/developer_guide/components/engine_server.md:虚推启用条件、NPU 采样指标、异常判定与 vLLM 指标过滤说明对齐实现。 - docs/zh/user_guide/deployment/k8s/config_reference.md:虚推相关字段说明微调。 - examples/infer_engines/sglang/user_config.json、user_config_pd_hetero.json:移除 SGLang 不支持的 health_check_config。 ## **4. 接口变更** 不涉及跨代码仓或客户面可见的 HTTP/API 契约变更。行为修正:GET /status 在 abnormal 后语义更稳定;SGLang 运行时强制关闭虚推(即使配置 enable_virtual_inference: true)。 ## **5. 测试结果** - bash tests/run_tests.sh:全部通过(6 warnings,与基线一致)。 - 聚焦:tests/engine_server/core/test_sim_inference.py、tests/engine_server/core/test_mgmt_endpoint.py 通过。 ## **6. CheckList** [x] 代码注释完备 [x] 正确记录维测日志 [x] 是否有UT用例 [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-PyMotor!456 | 29 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 天前 | ||
| 17 天前 | ||
| 29 天前 | ||
| 29 天前 |