| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
【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 | 7 天前 | |
修复 A2 上 sp-block 删除整个 annotations 问题 Co-authored-by: jingyp<jingyp@chinatelecom.cn> # message auto-generated for no-merge-commit merge: !644 merge bugfix/fix-sp-block-annotations into master 修复 A2 上 sp-block 删除整个 annotations 问题 Created-by: gcw_gxG14I7x Commit-by: jingyp Merged-by: towncharlie Description: ## **1. 合入背景** Fixes https://gitcode.com/Ascend/MindIE-Motor/issues/377 ## **2. 修改内容** A2 上仅删除可能的 sp-block annotation,不影响其他 ## **3. 资料变更** 无 ## **4. 接口变更** 不涉及 ## **5. 测试结果** 修复前:  修复后:  ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [ ] 代码注释完备 [ ] 正确记录维测日志 [ ] 是否有UT用例 [ ] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-Motor!644 | 16 小时前 | |
[bugfix]cpu/disk命中根据parent_hash + token_hash查找 Co-authored-by: ganglv<lvgang1@huawei.com> # message auto-generated for no-merge-commit merge: !601 merge conductor into master [bugfix]cpu/disk命中根据parent_hash + token_hash查找 Created-by: ganglv Commit-by: ganglv Merged-by: towncharlie Description: ## **1. 合入背景** > 请描述为什么要做这个PR内的改动。\ > 如涉及,请关联前序PR或同特性/需求下的其他PR。\ > 如果是修复之前PR引入的问题,请关联引入问题的PR。\ > 请通过#ISSUE ID关联issue。\ > 注意: Fixes #ISSUE ID会自动关闭issue,如问题部分解决请不要使用Fixes,可以用Fix part of #ISSUE ID替代. 完善 KV Conductor 多级缓存亲和性匹配,支持 HBM、CPU、Disk 间连续前缀查询,提升匹配准确性。 [#386](https://gitcode.com/Ascend/MindIE-Motor/issues/386) [#387](https://gitcode.com/Ascend/MindIE-Motor/issues/387) ## **2. 修改内容** > 请<ins>**描述修改内容的具体实现**</ins>,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列。 > 如果是需求或者重构类的PR,需要<ins>**补充详细设计文档**</ins>(说明上下游组件关系、时序图、类图、DFX能力等内容)。 - 重构多级缓存索引及跨介质断点续查逻辑。 - bugfix for dsv4 flash - 支持disk查询 - 按实例和 DP 聚合各介质命中块数,移除加权评分。 - 完善事件兼容、测试、设计文档及第三方许可证声明。 - 修复log monitor收集日志有重复的问题 - 修改rust precommit失败问题 & rust commit执行慢问题 ## **3. 资料变更** > 请确认<ins>**是否涉及资料变更**</ins>。\ > 如涉及,需要在PR中体现,并简要说明修改内容。\ > 如不涉及,需填写“不涉及”。 不涉及 ## **4. 接口变更** > 请确认<ins>**是否涉及跨代码仓或者客户面可见的接口变更**</ins>。\ > 如涉及,需详细说明接口以及对应的变更内容,同时需要在资料中体现。\ > 如不涉及,需填写“不涉及”。 - 配置项 xpu_endpoint 更名为 gpu_endpoint。 - 注册接口介质名称由 xpu 调整为 gpu,仍兼容旧名称。 - 查询结果由 XPU/CPU/DISK/total 加权分数调整为 gpu_blocks/cpu_blocks/disk_blocks/matched_tokens。 ## **5. 测试结果** > 需体现<ins>**测试场景,测试方法以及测试结果**</ins>。\ > 测试用例设计时需考虑硬件、部署方式、功能、性能、精度、显存等维度。 dsv4_flash  qwen  disk  rename to npu  ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [ ] 代码注释完备 [ ] 正确记录维测日志 [ ] 是否有UT用例 [ ] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-Motor!601 | 16 小时前 | |
[fix] 修复加载草稿模型慢的问题 Co-authored-by: c00951058<chenchaofeng5@huawei.com> # message auto-generated for no-merge-commit merge: !423 merge c00951058 into master [fix] 修复加载草稿模型慢的问题 Created-by: qq_40172610 Commit-by: c00951058 Merged-by: towncharlie Description: ## **1. 合入背景** 在 PD 分离 + 推测解码(MTP / deepseek_mtp)场景下,加载草稿模型(drafter)时,vLLM 的 DefaultModelLoader 会重新遍历权重目录下的全部 safetensors 文件,包含主模型的全部张量(DeepSeek V3.1 量化后权重约700 GB),仅为了从中挑出少量属于 MTP 层的张量。这导致: 草稿模型加载阶段产生大量无谓的磁盘 I/O,读取了本不需要的主模型权重; 端到端拉起时间显著变长,尤其在 NFS/Lustre 等网络文件系统上更为明显。 本 PR 仅涉及 examples/deployer/patch/0.23.0/ 下针对 vLLM 0.23.0 的补丁,目标是缩短草稿模型(MTP)权重加载时间,从而降低实例端到端拉起时长。 fixes [#239](https://gitcode.com/Ascend/MindIE-PyMotor/issues/239) ## **2. 修改内容** 本 PR 通过在 safetensors 权重迭代器中引入「按权重名过滤、在读盘前跳过」的能力,使草稿模型加载时只读取 MTP 相关张量。涉及以下补丁文件及组件交互: - vllm_mtp_deepseek_mtp.patch - vllm_shuffle_default_loader.patch - vllm_shuffle_weight_utils.patch - vllm_shuffle_load_config.patch - patch_apply_shuffle_safetensors.py 调用链路:DeepSeekMTP.weight_name_filter → DefaultModelLoader.Source.weight_filter → safetensors_weights_iterator(weight_filter=...) → 读盘前跳过非 MTP 权重。 ## **3. 资料变更** 不涉及。 ## **4. 接口变更** 不涉及。 ## **5. 测试结果** p端到端时长约8分钟  d端到端时长约7分钟   p中草稿模型拉起时间约30秒:  d中草稿模型拉起时间约20秒:  ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [x] 代码注释完备 [x] 正确记录维测日志 [x] 是否有UT用例 [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-PyMotor!423 | 28 天前 | |
[fix] deployer路径中创建对应ipv6工具,ras_monitor使用文件内独立ipv6工具 Co-authored-by: LinWei100<linwei100@huawei.com> # message auto-generated for no-merge-commit merge: !378 merge fix/ipv6-example into master [fix] deployer路径中创建对应ipv6工具,ras_monitor使用文件内独立ipv6工具 Created-by: LinWei100 Commit-by: LinWei100 Merged-by: towncharlie Description: ## **1. 合入背景** > 请描述为什么要做这个PR内的改动。\ > 如涉及,请关联前序PR或同特性/需求下的其他PR。\ > 如果是修复之前PR引入的问题,请关联引入问题的PR。\ > 请通过#ISSUE ID关联issue。\ > 注意: Fixes #ISSUE ID会自动关闭issue,如问题部分解决请不要使用Fixes,可以用Fix part of #ISSUE ID替代. ## **2. 修改内容** > 请<ins>**描述修改内容的具体实现**</ins>,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列。 > 如果是需求或者重构类的PR,需要<ins>**补充详细设计文档**</ins>(说明上下游组件关系、时序图、类图、DFX能力等内容)。 ## **3. 资料变更** > 请确认<ins>**是否涉及资料变更**</ins>。\ > 如涉及,需要在PR中体现,并简要说明修改内容。\ > 如不涉及,需填写“不涉及”。 ## **4. 接口变更** > 请确认<ins>**是否涉及跨代码仓或者客户面可见的接口变更**</ins>。\ > 如涉及,需详细说明接口以及对应的变更内容,同时需要在资料中体现。\ > 如不涉及,需填写“不涉及”。 ## **5. 测试结果** > 需体现<ins>**测试场景,测试方法以及测试结果**</ins>。\ > 测试用例设计时需考虑硬件、部署方式、功能、性能、精度、显存等维度。 ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [ ] 代码注释完备 [ ] 正确记录维测日志 [ ] 是否有UT用例 [ ] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-PyMotor!378 | 1 个月前 | |
[feature] 多kv池化后端支持 Co-authored-by: 吕有辉<lvyouhui@huawei.com> # message auto-generated for no-merge-commit merge: !382 merge memcache into master [feature] 多kv池化后端支持 Created-by: codeDogPro Commit-by: 吕有辉 Merged-by: towncharlie Description: ## **1. 合入背景** 适配多个池化后端【当前PR适配Memcache,yuanrong后端后续支持】 ## **2. 修改内容** 1、特性文档优化,多后端可拓展 2、startup脚本抽象kv_store_backends/,提升可维护性 3、添加memcache的metaservice,local service的脚本支持; 4、A2的聚合拉起;A3,A5的聚合、分离拉起local service的能力支持 ## **3. 资料变更** 设计 ## **4. 接口变更** 不涉及 ## **5. 测试结果** 能正常拉起memcache池化,压测请求无报错。 ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [ ] 代码注释完备 [ ] 正确记录维测日志 [ ] 是否有UT用例 [ ] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-PyMotor!382 | 22 天前 | |
[refractor] NodeManager代码微重构,提升代码可维护性 Co-authored-by: 吕有辉<lvyouhui@huawei.com> # message auto-generated for no-merge-commit merge: !620 merge refractor/node_manager into master [refractor] NodeManager代码微重构,提升代码可维护性 Created-by: codeDogPro Commit-by: 吕有辉 Merged-by: tobking Description: ## 1. 合入背景 ISSUE:https://gitcode.com/Ascend/MindIE-Motor/issues/368 ## 2. 修改内容 ### 2.1 Service Registry 重构 **文件**: motor/node_manager/core/services/registry.py 1. 用 typing.cast 消除 get_preparable() 中的 # type: ignore[arg-type,return-value]。 2. _MODULE_MAP 从模块级静态 dict 迁移到 _ServiceRegistry 实例属性,新增 add_discovery_path() API 支持动态注册后端模块路径。 3. 新增 get_active_sorted() 方法,将排序逻辑从 daemon.py 内联哨兵模式收归 registry。 4. _ServiceRegistration.is_active 改为 _is_active(active_backends) 方法,接受解析后的后端列表参数。 5. discover() 支持逗号分隔的多后端服务列表(如 "engine,memcache"),替代原来的单值匹配。 6. 删除 __slots__ 限制,2-3 个实例的内存节省可忽略。 7. 新增 tests/node_manager/core/services/test_registry.py,20 个单元测试覆盖 register、get_active 过滤、get_preparable 排序、discover 模块导入、重复注册、add_discovery_path、线程安全。 ### 2.2 服务协议提取 **文件**: motor/node_manager/core/services/protocols.py(新增) 1. DaemonService 和 PreparableService 从 registry.py 提取到 services/protocols.py。 2. daemon.py 直接从 protocols.py 导入,Protocol 定义与注册中心解耦。 ### 2.3 memcache LocalService 重构 **文件**: motor/node_manager/core/services/memcache/(新增目录) 1. **目录拆分**: services/memcache/ __init__.py worker.py ← LocalService 子进程入口(DistributedObjectStore().init(0)) lifecycle.py ← daemon 侧生命周期管理(@register_service、pull/stop/health_check) 2. **拉起方式改进**:pull() 使用 sys.executable -m motor.node_manager.core.services.memcache.worker 替代内联 -c 字符串,取消 PYTHON_EXEC_PATH 依赖。保持 subprocess.Popen(env=...) 确保与 Engine 子进程的 MMC_LOCAL_CONFIG_PATH 隔离。 3. **消除重复检查**:提取 _can_launch property,统一 should_launch() / pull() / prepare() 中的 enable、backend、mode 条件判断。 4. **简化 mark_dead()**:用 poll() 替代 wait(timeout=0) + 三重异常捕获。 5. **移除未使用的 _endpoints_count**:仅在日志中使用,改为局部变量。 ### 2.4 Engine 解耦 —— 服务配置化 **文件**: motor/node_manager/core/services/engine.py, motor/node_manager/core/daemon.py, motor/node_manager/main.py, motor/config/node_manager.py 1. @register_service(SERVICE_ENGINE) 新增 backend="engine",从 backend=None(始终激活)改为按配置激活。 2. KVCacheStoreConfig 新增 mode 字段("combined" / "separated"),通过 user_config.json 控制: json // Engine + KV 合体 Pod(默认) { "kv_cache_store_config": { "backend": "memcache", "mode": "combined" } } // KV 分离 Pod(只起 LocalService,不拉 Engine,不注册/心跳) { "kv_cache_store_config": { "backend": "memcache", "mode": "separated" } } // Engine only Pod {} 3. Daemon 新增 has_engine 属性,main.py 据此条件初始化 EngineManager / HeartbeatManager。 ### 2.5 main.py 重构 —— Application 基类 **文件**: motor/common/app/application.py(新增), motor/node_manager/node_manager.py(新增), motor/node_manager/main.py 1. **Application 基类** — 封装四个组件共享的 boilerplate: - 模块管理(add_module / get_module / stop_all_modules) - 配置热更新传播(on_config_updated → 先刷新自身间隔 _refresh_check_interval,再传播给所有带 update_config 的模块) - 可配置的 daemon loop 间隔(check_interval 参数,默认 1s,子类从 config 读取) - 信号处理(SIGINT / SIGTERM → threading.Event) - select-based daemon loop(stdin 读取 + stop_event.wait) - run() 模板方法:banner → init_modules → start_modules → config_watcher → daemon_loop → shutdown 2. **NodeManager(Application)**: - __init__ 传入 check_interval=config.basic_config.daemon_loop_interval(默认 5s,可在 user_config.json 中配置) - _refresh_check_interval():配置热更新时同步刷新间隔 - init_modules():根据 daemon.has_engine 动态注册模块 - _on_daemon_tick():每 tick 检查 HeartbeatManager 自杀标志 - exit_code:自杀时返回 -1(pod rescheduling) 3. **main.py 瘦身**:从 186 行 → 37 行 thin wrapper: python def main() -> int: config = NodeManagerConfig.from_json() reconfigure_logging(config.logging_config) run_port_setup_or_exit(apply_node_manager_ports, config) nm = NodeManager(config) return nm.run() 删除所有模块级全局变量(modules、_should_exit、config、config_watcher)和 7 个模块级函数。 ### 2.6 测试重构 1. 测试目录镜像源码结构: tests/node_manager/ __init__.py conftest.py test_config.py core/ __init__.py test_daemon.py test_engine_manager.py test_heartbeat_manager.py test_fault_reporter.py test_api_ready_event.py services/ __init__.py test_registry.py memcache/ __init__.py test_lifecycle.py 2. test_main_process_title.py 从 NodeManager 和 EngineServer 各一份合并为 tests/common/utils/test_process_title.py,NodeManager 用例适配新 NodeManager 类 API。 ### 2.7 改动文件清单 | 文件 | 改动类型 | |------|----------| | motor/common/app/__init__.py | 新增 | | motor/common/app/application.py | 新增 | | motor/node_manager/node_manager.py | 新增 | | motor/node_manager/core/services/protocols.py | 新增 | | motor/node_manager/core/services/memcache/__init__.py | 新增 | | motor/node_manager/core/services/memcache/worker.py | 新增 | | motor/node_manager/core/services/memcache/lifecycle.py | 重命名自 local_service.py | | tests/node_manager/core/__init__.py | 新增 | | tests/node_manager/core/services/__init__.py | 新增 | | tests/node_manager/core/services/memcache/__init__.py | 新增 | | tests/node_manager/core/services/test_registry.py | 新增 | | tests/node_manager/core/services/memcache/test_lifecycle.py | 重命名 | | tests/common/utils/test_process_title.py | 合并自两份拷贝 | | motor/node_manager/core/services/registry.py | 重构 | | motor/node_manager/core/daemon.py | 重构 | | motor/node_manager/core/services/engine.py | 改动 | | motor/node_manager/main.py | 瘦身 | | motor/config/node_manager.py | 改动 | | motor/node_manager/core/__init__.py | 删除多余版权声明 | | motor/node_manager/core/services/__init__.py | 删除多余版权声明 | | motor/node_manager/__init__.py | 删除多余版权声明 | ## 3. 资料变更 不涉及。 ## 4. 接口变更 不涉及(所有改动为内部重构,对外接口不变)。 ## 5. 测试结果 python -m pytest tests/node_manager/ tests/common/utils/test_process_title.py tests/engine_server/ -q 529 passed in 1.47s 测试覆盖: - **registry**:注册、过滤、排序、发现、线程安全(20 个用例) - **memcache lifecycle**:should_launch、prepare、pull、stop、health_check(11 个用例) - **daemon**:engine pull、参数校验、D2D peer、signal handler(13 个用例) - **heartbeat manager**:状态上报、端点管理、自杀检测 - **engine manager**:注册、re-register、ranktable、snapshot - **config**:配置解析、验证、热加载 - **process_title**:NodeManager + EngineServer 标题设置(4 个用例) ## 6. CheckList - [x] 代码注释完备 - [x] 正确记录维测日志 - [x] 是否有UT用例(新增 24 个用例,全量 529 passed) - [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 - _ServiceRegistry 使用 threading.Lock 保护 _registrations 和 _module_map - daemon.py 和 engine.py 的锁均为短临界区非嵌套使用 - Application 的信号处理仅设 threading.Event,清理在主线程执行 See merge request: Ascend/MindIE-Motor!620 | 5 天前 | |
[refractor]重构motor与memcache的交互逻辑 Co-authored-by: 吕有辉<lvyouhui@huawei.com> # message auto-generated for no-merge-commit merge: !530 merge feat/memcache_ssd into master [refractor]重构motor与memcache的交互逻辑 Created-by: codeDogPro Commit-by: 吕有辉 Merged-by: tobking Description: ## **1. 合入背景** https://gitcode.com/Ascend/MindIE-Motor/issues/353 ## **2. 修改内容** 1、完全重构motor与memcache的对接逻辑,解耦组件的交互 2、local service独立为单独的进程,由daemon拉起,提升拉起速度 ## **3. 资料变更** 涉及 ## **4. 接口变更** 不涉及 ## **5. 测试结果** 使用新拉起方式后A3拉起正常(standalone) HELP motor:prompt_tokens_per_second Prompt tokens per second computed from vllm:prompt_tokens_total counter deltas # TYPE motor:prompt_tokens_per_second gauge motor:prompt_tokens_per_second 0.0 # HELP motor:generation_tokens_per_second Generation tokens per second computed from vllm:generation_tokens_total counter deltas # TYPE motor:generation_tokens_per_second gauge motor:generation_tokens_per_second 0.0 # HELP vllm:prefix_cache_hit_rate Prefix cache hit rate (cached tokens / queried tokens). # TYPE vllm:prefix_cache_hit_rate gauge vllm:prefix_cache_hit_rate 0.0 # HELP motor:active_prefill_workers Number of active prefill instances # TYPE motor:active_prefill_workers gauge motor:active_prefill_workers 1 # HELP motor:active_decode_workers Number of active decode instances # TYPE motor:active_decode_workers gauge motor:active_decode_workers 1 # HELP motor:inactive_prefill_workers Number of inactive prefill instances # TYPE motor:inactive_prefill_workers gauge motor:inactive_prefill_workers 0 # HELP motor:inactive_decode_workers Number of inactive decode instances # TYPE motor:inactive_decode_workers gauge motor:inactive_decode_workers 0 # HELP kv_store_size KV store size in GB (layer=cpu|ssd|all, stat=usage|total) # TYPE kv_store_size gauge kv_store_size{layer="cpu",stat="usage"} 0.0 kv_store_size{layer="cpu",stat="total"} 64.0 kv_store_size{layer="ssd",stat="usage"} 0.0 kv_store_size{layer="ssd",stat="total"} 0.0 kv_store_size{layer="all",stat="usage"} 0.0 kv_store_size{layer="all",stat="total"} 64.0 # HELP kv_store_ratio KV store used ratio 0-1 (layer=cpu|ssd|all, stat=usage_rate) # TYPE kv_store_ratio gauge kv_store_ratio{layer="cpu",stat="usage_rate"} 0.0 kv_store_ratio{layer="ssd",stat="usage_rate"} 0.0 kv_store_ratio{layer="all",stat="usage_rate"} 0.0 # HELP kv_store_keys KV store number of stored keys # TYPE kv_store_keys gauge kv_store_keys 0.0 # HELP kv_store_eviction KV store eviction counters (stat=success|attempts) # TYPE kv_store_eviction gauge kv_store_eviction{stat="success"} 0.0 kv_store_eviction{stat="attempts"} 0.0 # HELP motor:memcache_segment_capacity_bytes Segment total capacity in bytes # TYPE motor:memcache_segment_capacity_bytes gauge motor:memcache_segment_capacity_bytes{segment="rank-0-dram"} 17179869184 motor:memcache_segment_capacity_bytes{segment="rank-1-dram"} 17179869184 # HELP motor:memcache_segment_allocated_bytes Segment allocated bytes # TYPE motor:memcache_segment_allocated_bytes gauge motor:memcache_segment_allocated_bytes{segment="rank-0-dram"} 0 motor:memcache_segment_allocated_bytes{segment="rank-1-dram"} 0 # HELP motor:memcache_total_capacity_bytes Total capacity by medium in bytes # TYPE motor:memcache_total_capacity_bytes gauge motor:memcache_total_capacity_bytes{medium="hbm"} 0 motor:memcache_total_capacity_bytes{medium="dram"} 34359738368 # HELP motor:memcache_allocated_bytes Allocated bytes by medium 压测性能: ╒══════════════════════════╤═════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════╕ │ Performance Parameters │ Stage │ Average │ Min │ Max │ Median │ P75 │ P90 │ P99 │ N │ ╞══════════════════════════╪═════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════╡ │ E2EL │ total │ 6848.4 ms │ 4251.6 ms │ 7985.9 ms │ 7590.0 ms │ 7717.7 ms │ 7879.3 ms │ 7975.2 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ TTFT │ total │ 422.2 ms │ 253.7 ms │ 733.2 ms │ 369.6 ms │ 486.8 ms │ 637.4 ms │ 723.6 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ TPOT │ total │ 14.4 ms │ 14.1 ms │ 14.5 ms │ 14.4 ms │ 14.5 ms │ 14.5 ms │ 14.5 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ ITL │ total │ 14.3 ms │ 0.0 ms │ 62.8 ms │ 13.8 ms │ 14.1 ms │ 15.3 ms │ 27.8 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ InputTokens │ total │ 1491.5 │ 1460.0 │ 1545.0 │ 1490.5 │ 1499.25 │ 1515.6 │ 1542.06 │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ OutputTokens │ total │ 448.375 │ 245.0 │ 512.0 │ 512.0 │ 512.0 │ 512.0 │ 512.0 │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ OutputTokenThroughput │ total │ 65.0576 token/s │ 57.6249 token/s │ 68.1729 token/s │ 65.8792 token/s │ 66.6954 token/s │ 67.1812 token/s │ 68.0737 token/s │ 8 │ ╘══════════════════════════╧═════════╧═════════════════╧═════════════════╧═════════════════╧═════════════════╧═════════════════╧═════════════════╧═════════════════╧═════╛ inprocess 模式测试如下: # HELP motor:memcache_segment_capacity_bytes Segment total capacity in bytes # TYPE motor:memcache_segment_capacity_bytes gauge motor:memcache_segment_capacity_bytes{segment="rank-0-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-1-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-2-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-3-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-4-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-5-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-6-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-7-dram"} 2147483648 # HELP motor:memcache_segment_allocated_bytes Segment allocated bytes # TYPE motor:memcache_segment_allocated_bytes gauge motor:memcache_segment_allocated_bytes{segment="rank-0-dram"} 12582912 motor:memcache_segment_allocated_bytes{segment="rank-1-dram"} 37748736 motor:memcache_segment_allocated_bytes{segment="rank-2-dram"} 37748736 motor:memcache_segment_allocated_bytes{segment="rank-3-dram"} 25165824 motor:memcache_segment_allocated_bytes{segment="rank-4-dram"} 50331648 motor:memcache_segment_allocated_bytes{segment="rank-5-dram"} 44040192 motor:memcache_segment_allocated_bytes{segment="rank-6-dram"} 56623104 motor:memcache_segment_allocated_bytes{segment="rank-7-dram"} 25165824 # HELP motor:memcache_total_capacity_bytes Total capacity by medium in by 压测性能一致 ``` ╒══════════════════════════╤═════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤════════════════╤═════════════════╤═════╕ │ Performance Parameters │ Stage │ Average │ Min │ Max │ Median │ P75 │ P90 │ P99 │ N │ ╞══════════════════════════╪═════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪════════════════╪═════════════════╪═════╡ │ E2EL │ total │ 6847.9 ms │ 4285.2 ms │ 8056.9 ms │ 7528.6 ms │ 7755.3 ms │ 7959.6 ms │ 8047.2 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ TTFT │ total │ 431.8 ms │ 259.8 ms │ 723.0 ms │ 414.1 ms │ 458.9 ms │ 614.0 ms │ 712.1 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ TPOT │ total │ 14.4 ms │ 13.9 ms │ 14.7 ms │ 14.4 ms │ 14.7 ms │ 14.7 ms │ 14.7 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ ITL │ total │ 14.3 ms │ 0.0 ms │ 71.6 ms │ 13.8 ms │ 14.2 ms │ 15.4 ms │ 24.7 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ InputTokens │ total │ 1491.5 │ 1460.0 │ 1545.0 │ 1490.5 │ 1499.25 │ 1515.6 │ 1542.06 │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ OutputTokens │ total │ 448.375 │ 245.0 │ 512.0 │ 512.0 │ 512.0 │ 512.0 │ 512.0 │ 8 │ ├──────────────────────────┼─────────┼── See merge request: Ascend/MindIE-Motor!530 | 8 天前 | |
use nodePort in template as default coordinator infer nodePort Co-authored-by: jingyp<jingyp@chinatelecom.cn> # message auto-generated for no-merge-commit merge: !638 merge bugfix/refine-infer-port into master use nodePort in template as default coordinator infer nodePort Created-by: gcw_gxG14I7x Commit-by: jingyp Merged-by: ascend-robot Description: ## **1. 合入背景** Fixes https://gitcode.com/Ascend/MindIE-Motor/issues/376 ## **2. 修改内容** 修改 user_config 中 coordinator_infer_node_port 设置逻辑: 1. 如果未配置、配置不合法、为空,使用 examples/deployer/yaml_template 中定义的默认值 2. 如果配置为 -,则端口为随机值 3. 如果配置为合法端口,则按指定的配置 ## **3. 资料变更** 不涉及 ## **4. 接口变更** 不涉及 ## **5. 测试结果**  ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [ ] 代码注释完备 [ ] 正确记录维测日志 [ ] 是否有UT用例 [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-Motor!638 | 5 天前 | |
[refractor]重构motor与memcache的交互逻辑 Co-authored-by: 吕有辉<lvyouhui@huawei.com> # message auto-generated for no-merge-commit merge: !530 merge feat/memcache_ssd into master [refractor]重构motor与memcache的交互逻辑 Created-by: codeDogPro Commit-by: 吕有辉 Merged-by: tobking Description: ## **1. 合入背景** https://gitcode.com/Ascend/MindIE-Motor/issues/353 ## **2. 修改内容** 1、完全重构motor与memcache的对接逻辑,解耦组件的交互 2、local service独立为单独的进程,由daemon拉起,提升拉起速度 ## **3. 资料变更** 涉及 ## **4. 接口变更** 不涉及 ## **5. 测试结果** 使用新拉起方式后A3拉起正常(standalone) HELP motor:prompt_tokens_per_second Prompt tokens per second computed from vllm:prompt_tokens_total counter deltas # TYPE motor:prompt_tokens_per_second gauge motor:prompt_tokens_per_second 0.0 # HELP motor:generation_tokens_per_second Generation tokens per second computed from vllm:generation_tokens_total counter deltas # TYPE motor:generation_tokens_per_second gauge motor:generation_tokens_per_second 0.0 # HELP vllm:prefix_cache_hit_rate Prefix cache hit rate (cached tokens / queried tokens). # TYPE vllm:prefix_cache_hit_rate gauge vllm:prefix_cache_hit_rate 0.0 # HELP motor:active_prefill_workers Number of active prefill instances # TYPE motor:active_prefill_workers gauge motor:active_prefill_workers 1 # HELP motor:active_decode_workers Number of active decode instances # TYPE motor:active_decode_workers gauge motor:active_decode_workers 1 # HELP motor:inactive_prefill_workers Number of inactive prefill instances # TYPE motor:inactive_prefill_workers gauge motor:inactive_prefill_workers 0 # HELP motor:inactive_decode_workers Number of inactive decode instances # TYPE motor:inactive_decode_workers gauge motor:inactive_decode_workers 0 # HELP kv_store_size KV store size in GB (layer=cpu|ssd|all, stat=usage|total) # TYPE kv_store_size gauge kv_store_size{layer="cpu",stat="usage"} 0.0 kv_store_size{layer="cpu",stat="total"} 64.0 kv_store_size{layer="ssd",stat="usage"} 0.0 kv_store_size{layer="ssd",stat="total"} 0.0 kv_store_size{layer="all",stat="usage"} 0.0 kv_store_size{layer="all",stat="total"} 64.0 # HELP kv_store_ratio KV store used ratio 0-1 (layer=cpu|ssd|all, stat=usage_rate) # TYPE kv_store_ratio gauge kv_store_ratio{layer="cpu",stat="usage_rate"} 0.0 kv_store_ratio{layer="ssd",stat="usage_rate"} 0.0 kv_store_ratio{layer="all",stat="usage_rate"} 0.0 # HELP kv_store_keys KV store number of stored keys # TYPE kv_store_keys gauge kv_store_keys 0.0 # HELP kv_store_eviction KV store eviction counters (stat=success|attempts) # TYPE kv_store_eviction gauge kv_store_eviction{stat="success"} 0.0 kv_store_eviction{stat="attempts"} 0.0 # HELP motor:memcache_segment_capacity_bytes Segment total capacity in bytes # TYPE motor:memcache_segment_capacity_bytes gauge motor:memcache_segment_capacity_bytes{segment="rank-0-dram"} 17179869184 motor:memcache_segment_capacity_bytes{segment="rank-1-dram"} 17179869184 # HELP motor:memcache_segment_allocated_bytes Segment allocated bytes # TYPE motor:memcache_segment_allocated_bytes gauge motor:memcache_segment_allocated_bytes{segment="rank-0-dram"} 0 motor:memcache_segment_allocated_bytes{segment="rank-1-dram"} 0 # HELP motor:memcache_total_capacity_bytes Total capacity by medium in bytes # TYPE motor:memcache_total_capacity_bytes gauge motor:memcache_total_capacity_bytes{medium="hbm"} 0 motor:memcache_total_capacity_bytes{medium="dram"} 34359738368 # HELP motor:memcache_allocated_bytes Allocated bytes by medium 压测性能: ╒══════════════════════════╤═════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════╕ │ Performance Parameters │ Stage │ Average │ Min │ Max │ Median │ P75 │ P90 │ P99 │ N │ ╞══════════════════════════╪═════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════╡ │ E2EL │ total │ 6848.4 ms │ 4251.6 ms │ 7985.9 ms │ 7590.0 ms │ 7717.7 ms │ 7879.3 ms │ 7975.2 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ TTFT │ total │ 422.2 ms │ 253.7 ms │ 733.2 ms │ 369.6 ms │ 486.8 ms │ 637.4 ms │ 723.6 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ TPOT │ total │ 14.4 ms │ 14.1 ms │ 14.5 ms │ 14.4 ms │ 14.5 ms │ 14.5 ms │ 14.5 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ ITL │ total │ 14.3 ms │ 0.0 ms │ 62.8 ms │ 13.8 ms │ 14.1 ms │ 15.3 ms │ 27.8 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ InputTokens │ total │ 1491.5 │ 1460.0 │ 1545.0 │ 1490.5 │ 1499.25 │ 1515.6 │ 1542.06 │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ OutputTokens │ total │ 448.375 │ 245.0 │ 512.0 │ 512.0 │ 512.0 │ 512.0 │ 512.0 │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────┤ │ OutputTokenThroughput │ total │ 65.0576 token/s │ 57.6249 token/s │ 68.1729 token/s │ 65.8792 token/s │ 66.6954 token/s │ 67.1812 token/s │ 68.0737 token/s │ 8 │ ╘══════════════════════════╧═════════╧═════════════════╧═════════════════╧═════════════════╧═════════════════╧═════════════════╧═════════════════╧═════════════════╧═════╛ inprocess 模式测试如下: # HELP motor:memcache_segment_capacity_bytes Segment total capacity in bytes # TYPE motor:memcache_segment_capacity_bytes gauge motor:memcache_segment_capacity_bytes{segment="rank-0-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-1-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-2-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-3-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-4-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-5-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-6-dram"} 2147483648 motor:memcache_segment_capacity_bytes{segment="rank-7-dram"} 2147483648 # HELP motor:memcache_segment_allocated_bytes Segment allocated bytes # TYPE motor:memcache_segment_allocated_bytes gauge motor:memcache_segment_allocated_bytes{segment="rank-0-dram"} 12582912 motor:memcache_segment_allocated_bytes{segment="rank-1-dram"} 37748736 motor:memcache_segment_allocated_bytes{segment="rank-2-dram"} 37748736 motor:memcache_segment_allocated_bytes{segment="rank-3-dram"} 25165824 motor:memcache_segment_allocated_bytes{segment="rank-4-dram"} 50331648 motor:memcache_segment_allocated_bytes{segment="rank-5-dram"} 44040192 motor:memcache_segment_allocated_bytes{segment="rank-6-dram"} 56623104 motor:memcache_segment_allocated_bytes{segment="rank-7-dram"} 25165824 # HELP motor:memcache_total_capacity_bytes Total capacity by medium in by 压测性能一致 ``` ╒══════════════════════════╤═════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤═════════════════╤════════════════╤═════════════════╤═════╕ │ Performance Parameters │ Stage │ Average │ Min │ Max │ Median │ P75 │ P90 │ P99 │ N │ ╞══════════════════════════╪═════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪═════════════════╪════════════════╪═════════════════╪═════╡ │ E2EL │ total │ 6847.9 ms │ 4285.2 ms │ 8056.9 ms │ 7528.6 ms │ 7755.3 ms │ 7959.6 ms │ 8047.2 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ TTFT │ total │ 431.8 ms │ 259.8 ms │ 723.0 ms │ 414.1 ms │ 458.9 ms │ 614.0 ms │ 712.1 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ TPOT │ total │ 14.4 ms │ 13.9 ms │ 14.7 ms │ 14.4 ms │ 14.7 ms │ 14.7 ms │ 14.7 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ ITL │ total │ 14.3 ms │ 0.0 ms │ 71.6 ms │ 13.8 ms │ 14.2 ms │ 15.4 ms │ 24.7 ms │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ InputTokens │ total │ 1491.5 │ 1460.0 │ 1545.0 │ 1490.5 │ 1499.25 │ 1515.6 │ 1542.06 │ 8 │ ├──────────────────────────┼─────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼─────────────────┼────────────────┼─────────────────┼─────┤ │ OutputTokens │ total │ 448.375 │ 245.0 │ 512.0 │ 512.0 │ 512.0 │ 512.0 │ 512.0 │ 8 │ ├──────────────────────────┼─────────┼── See merge request: Ascend/MindIE-Motor!530 | 8 天前 | |
【feature】mindie-motor实现跨服务池化功能 Co-authored-by: gitcode-bot<noreply@gitcode.com> Co-authored-by: zhang980530<zhanghao680@h-partners.com> # message auto-generated for no-merge-commit merge: !641 merge master into master 【feature】mindie-motor实现跨服务池化功能 Created-by: zhang980530 Commit-by: zhang980530;gitcode-bot Merged-by: towncharlie Description: ## **1. 合入背景** 此 PR 主要引入了 KV 缓存存储(KV Cache Store)跨部署复用的能力。通过新增 kv_cache_store.py 模块,系统可以在部署时检查指定 target_job_id 的命名空间中是否已有可用的 KV Store 服务和运行中的 Pod,若有则复用而非重新部署,从而节省资源。同时引入了全局标志 g_kv_store_deploy_pod 来控制是否部署本地 KV Store Pod,并在多处调用链路中传递 user_config 以支持该复用逻辑。 Fixes [#392](https://gitcode.com/Ascend/MindIE-PyMotor/issues/392) ## **2. 修改内容** 新增 kv_cache_store.py 模块:实现了 KV Store 复用的核心逻辑,包括 resolve_kv_store_target_job_id(解析目标 job_id)、kv_store_reusable(检查集群中是否存在可复用服务)、apply_kv_store_service_domain(统一配置 KV Store 服务 FQDN 并决定是否部署新 Pod)等函数。 新增全局标志 g_kv_store_deploy_pod:在 k8s_utils.py 中新增该标志(默认 True),由 update_kv_store_enabled_flag 和 apply_kv_store_service_domain 共同控制;当复用已有 KV Store 时设为 False,_configure_kv_store_role 据此将副本数设为 0 以跳过 Pod 部署。 新增配置项 TARGET_JOB_ID 和标签 KV_STORE_APP_LABEL:在 constant.py 中新增 TARGET_JOB_ID = "target_job_id" 和 KV_STORE_APP_LABEL = "mindie-motor-kv-store",分别用于指定复用目标任务和作为 Pod 选择器标签。 重构 init_service_domain_name 与 init_infer_service_domain_name 签名:两函数均新增 user_config 参数,并将 KV Store 服务域名配置逻辑统一委托给 apply_kv_store_service_domain;支持 skip_kv_store 参数以在特定场景跳过 KV Store 域名初始化。 调整 deploy.py 调用链:所有调用 init_service_domain_name 和 init_infer_service_domain_name 的位置均传入 user_config;handle_update_instance_num 中调用时传入 skip_kv_store=True,KV Store 部署增加 g_kv_store_deploy_pod 条件判断。 ## **3. 资料变更** “不涉及”。 ## **4. 接口变更** “不涉及”。 ## **5. 测试结果**   ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [x] 代码注释完备 [x] 正确记录维测日志 [x] 是否有UT用例 [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-Motor!641 | 1 天前 | |
[fix] add deployer requirement Co-authored-by: yilunh<hanyilun1@huawei.com> # message auto-generated for no-merge-commit merge: !485 merge deployer into master [fix] add deployer requirement Created-by: yilunh Commit-by: yilunh Merged-by: towncharlie Description: ## **1. 合入背景** 1、由于ras_monitor在宿主机上执行,存在import urllib3失败的场景 ## **2. 修改内容** 1、deployer下的requirement.txt新增requests>=2.31.0,和容器内requirements保持一致 ## **3. 资料变更** 不涉及 ## **4. 接口变更** 不涉及 ## **5. 测试结果** > 需体现<ins>**测试场景,测试方法以及测试结果**</ins>。\ > 测试用例设计时需考虑硬件、部署方式、功能、性能、精度、显存等维度。 ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [ ] 代码注释完备 [ ] 正确记录维测日志 [ ] 是否有UT用例 [ ] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-PyMotor!485 | 22 天前 | |
[feature] Controller FaultTolerance模块支持软件故障上报,与硬件故障共同产生恢复策略 Co-authored-by: 吕有辉<lvyouhui@huawei.com> # message auto-generated for no-merge-commit merge: !147 merge ft_ehance into master [feature] Controller FaultTolerance模块支持软件故障上报,与硬件故障共同产生恢复策略 Created-by: codeDogPro Commit-by: 吕有辉 Merged-by: towncharlie Description: ## **1. 合入背景** https://gitcode.com/Ascend/MindIE-PyMotor/issues/111 ## **2. 修改内容** https://gitcode.com/Ascend/MindIE-PyMotor/issues/111 bug修复: 1、log_monitor若干bug修复,有删除服务,或者kubelet不可用时的疯狂日志增加 2、删除服务后后台监控日志的进程不会自己退出,导致进程堆积 3、Controller clusterrole,clusterrolebinding等K8S配置没有用namespace区分,导致多个服务产生冲突。 ## **3. 资料变更** 涉及 ## **4. 接口变更** 不涉及 ## **5. 测试结果** 1、实际2P1D测试,节点互换逻辑无问题 2、修复log采集脚本,实际环境测试,修复了频繁产生冗余日志的问题 ## **6. CheckList** > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] [x] 代码注释完备 [x] 正确记录维测日志 [x] 是否有UT用例 [x] 若涉及多线程场景,考虑了并发场景,不存在死锁问题 See merge request: Ascend/MindIE-PyMotor!147 | 2 个月前 |
Deployer 部署工具
本目录包含 PD disaggregation 服务的部署脚本与配置模板,用于在集群中部署 Controller、Coordinator、Engine 等组件。
使用说明
本目录仅提供部署所需的脚本与示例配置。完整的部署流程、环境要求、配置说明及故障排查请参考以下文档:
建议在正式部署前先阅读上述文档,按文档完成环境准备与配置后再使用本目录中的工具进行部署。
deploy.py 使用方法
参数说明
Motor服务部署参数说明
| 参数 | 简写 | 说明 |
|---|---|---|
--config_dir |
--dir |
配置文件所在目录,目录下需包含 user_config.json 和 env.json |
--user_config_path |
--config |
用户配置文件路径,与 --env 必须同时指定 |
--env_config_path |
--env |
环境配置文件路径,与 --config 必须同时指定 |
--update_config |
- | 仅更新 ConfigMap,不重新部署 |
--update_instance_num |
- | 根据配置扩缩容实例数量 |
--dry-run |
- | 仅生成 YAML 文件,不执行 kubectl apply |
--auto_log_collect |
- | 部署完成后自动启动日志采集 |
--nostep |
- | 部署完成后不显示服务启动进度条 |
Motor配置文件自动生成参数说明
| 参数 | 简写 | 说明 |
|---|---|---|
--mode |
- | deploy(默认)或 general_config(从 vLLM 脚本生成配置) |
--deploy-scenario |
- | general_config 必填:hybrid / separate |
--hardware-type |
- | general_config 必填:A2 / A3 |
--weight-path |
- | general_config 可选:权重挂载路径 |
--image-name |
- | general_config 可选:镜像名称 |
使用方式
方式零:交互式 TUI 模式
python deploy.py
不带任何参数启动 deploy.py 会进入交互式终端 UI(TUI),提供可视化的服务管理界面:
| 操作 | 按键 | 说明 |
|---|---|---|
| 部署服务 | R |
输入配置目录路径,执行部署 |
| 显示启动进度 | P |
打开/关闭内嵌进度条,实时查看各 Engine Pod 启动状态 |
| 日志采集 | L |
启动/重启日志采集 |
| 更新配置 | U |
更新集群 ConfigMap |
| 删除服务 | D |
输入 namespace 并确认后删除所有服务 |
| 退出 | Q |
退出 TUI |
交互方式:
↑↓或 vim 风格jk导航菜单Enter选中当前高亮项- 也可直接按菜单项的字母键(
[R][P][L][U][D][Q])快速触发
已部署状态下,进度监控(
P)会自动发现 Running 的 vLLM Pod,通过尾随kubectl logs解析启动日志,在菜单下方绘制每个 Pod 的实时进度条,并展示 Pod 就绪状态(kubectl get pods)。
方式一:指定配置目录(推荐)
python deploy.py --config_dir ../infer_engines/vllm
程序会自动从指定目录下读取 user_config.json 和 env.json。
方式二:单独指定配置文件
python deploy.py --config ../infer_engines/vllm/user_config.json --env ../infer_engines/vllm/env.json
方式三:混合使用
python deploy.py --config_dir ../infer_engines/vllm --config /path/to/custom_user_config.json --env /path/to/custom_env.json
当同时指定 --config_dir 和 --config/--env 时,以 --config 和 --env 为准。
方式四:基于vllm部署脚本生成Motor全量配置文件
使用方式请参阅Motor配置自动生成指导。
其他操作
更新配置
python deploy.py --config_dir ../infer_engines/vllm --update_config
仅更新集群中的 ConfigMap,不重新部署服务。
扩缩容实例
python deploy.py --config_dir ../infer_engines/vllm --update_instance_num
根据 user_config.json 中的 p_instances_num 和 d_instances_num 进行实例扩缩容。
配置文件说明
配置文件位于 examples/infer_engines/ 目录下,根据引擎类型和模型选择对应的配置:
examples/infer_engines/
├── vllm/ # vLLM 引擎配置
│ ├── user_config.json # 快速启动用户配置
│ ├── env.json # 快速启动环境变量配置
│ └── models/ # 特定模型配置
│ └── deepseek/
│ └── v3_1/
│ ├── user_config.json
│ └── env_v3_1_A2_EP32.json
└── ...
user_config.json
包含服务部署配置,主要字段:
motor_deploy_config: 部署相关配置(实例数、镜像、部署模式等)motor_controller_config: Controller 组件配置motor_coordinator_config: Coordinator 组件配置motor_engine_prefill_config: Prefill 引擎配置motor_engine_decode_config: Decode 引擎配置kv_cache_store_config: KV 缓存池配置
motor_deploy_config 支持按组件配置调度标签和 Coordinator 对外端口:
| 字段 | 说明 |
|---|---|
coordinator_infer_node_port |
Coordinator 推理 Service 的 NodePort。缺省时保留模板中的 nodePort(当前模板默认 31015);配置 "-" 时由 Kubernetes 自动分配;也可配置具体端口数字。 |
controller_node_selector |
Controller Pod 的自定义 nodeSelector。 |
coordinator_node_selector |
Coordinator Pod 的自定义 nodeSelector。 |
prefill_node_selector |
Prefill Pod 的自定义 nodeSelector。 |
decode_node_selector |
Decode Pod 的自定义 nodeSelector。 |
kv_pool_node_selector |
KV Pool Pod 的自定义 nodeSelector。 |
kv_conductor_node_selector |
KV Conductor Pod 的自定义 nodeSelector。 |
Node selector 字段均为 JSON 对象。自定义标签会与 deployer 根据 hardware_type 生成的硬件标签合并,例如:
这些组件级字段适用于 multi_deployment 和 infer_service_set 等组件分别运行在不同 Pod 的部署模式。single_container 模式下所有组件共享一个 Pod,因此不应用独立的组件级 node selector。
{
"motor_deploy_config": {
"coordinator_infer_node_port": "-",
"controller_node_selector": {"label1": "value1"},
"coordinator_node_selector": {"label1": "value1"},
"prefill_node_selector": {"label1": "value1"},
"decode_node_selector": {"label1": "value1"},
"kv_pool_node_selector": {"label1": "value1"},
"kv_conductor_node_selector": {"label1": "value1"}
}
}
env.json
包含环境变量配置,主要字段:
motor_common_env: 公共环境变量motor_controller_env: Controller 环境变量motor_coordinator_env: Coordinator 环境变量motor_engine_prefill_env: Prefill 引擎环境变量motor_engine_decode_env: Decode 引擎环境变量
参考示例
如需具体模型的拉起与配置示例,可参考仓库中的 examples/infer_engines/ 目录:
该目录下提供多种场景的参考配置与脚本,便于按实际模型进行部署与调优。
Motor 自动管理的 vLLM 原生参数
以下 vLLM 原生 CLI 参数由 PyMotor 在注册、组装、拉起过程中自动推导和注入,无需在 engine_config 中手动指定:
| 参数 | 自动管理方式 |
|---|---|
data-parallel-address |
Controller 根据组装结果确定 master DP 节点 IP,通过 StartCmdMsg.master_dp_ip → --master-dp-ip 传入 EngineServer |
data-parallel-rank |
由 Endpoint ID 决定,NodeManager Daemon 以 --dp-rank 传入 EngineServer |
node-rank |
Controller 按 NodeManager 注册先后顺序分配(先注册 = 主节点 rank 0),通过 StartCmdMsg.node_rank → --node-rank 传入 EngineServer |
master-addr |
EngineServer 在检测到跨节点 PCP 模式(nnodes > 1 且 master-port 存在)时,自动将 master-dp-ip 作为 --master-addr 注入 vLLM |
headless |
EngineServer 在跨节点 PCP 模式下,对 node-rank != 0 的从节点自动追加 --headless |
注意:跨节点 PCP 场景下,用户仅需在
engine_config中配置nnodes和master-port,其余参数由 Motor 自动处理。
CLI 参数与 engine_config 键名的完整映射关系详见:
👉 [CLI 参数与 engine_config 映射指南](CLI 参数完整定义与校验见 motor/config/endpoint.py 中 EndpointConfig.parse_cli_args)