MindStudio-Modeling(msmodeling)是MindStudio建模寻优工具,评估模型及服务化等场景下的理论性能,并在此基础上寻找性能较优的部署策略等参数。
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(sig-review): 新增 SIG 化代码检视 skill Co-authored-by: jhon-117<fangkai15@huawei.com> # message auto-generated for no-merge-commit merge: !553 merge feat/sig-review into master feat(sig-review): 新增 SIG 化代码检视 skill Created-by: jhon-117 Commit-by: jhon-117 Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 新增AI开发规范配套工具 ------ ## 📝 Modification / 修改内容 #### 功能概述 新增 sig-review skill,让 PR 作者和检视者通过自然语言与 AI agent 交互,完成从"请求检视"到"检视完成移交"的全流程。**无需安装任何外部工具**,全程自然语言驱动。 msmodeling 按目录划分为 10 个子 SIG,本 skill 自动将 PR 路由到正确的 SIG 并指派检视人员,确保每个 PR 有人及时审查、责任传递不断链。 #### 核心能力 | 能力 | 触发词 | 说明 | |------|--------|------| | 请求检视 | "请求检视" | 分析 PR 变更文件归属哪个 SIG,指派对应 chair | | 查看待检视 | "我有哪些待检视PR" | 列出当前分配给自己的所有待检视 PR | | 代码检视 | "检视PR 123" | 获取 diff、分析问题、提交结构化检视意见 | | 查看状态 | "PR 123 状态" | 查看 PR 的审查人、标签、状态 | | 转交检视 | "转给 XXX" | 将检视责任转给其他人 | | 完成移交 | "完成检视" | 通过则移交给 approver,有意见则转回作者修改 | #### 变更文件 | 文件 | 说明 | |------|------| | .agents/skills/sig-review/SKILL.md | Skill 定义:触发条件、检视流程、评论格式规范、安全规则 | | .agents/skills/sig-review/scripts/review_api.py | 自包含 GitCode API 工具(零外部依赖,仅 Python 标准库),含 auth/fetch/assign/list/status/comment/handoff/complete/verdict/withdraw 共 11 个命令 | | .agents/skills/sig-review/scripts/test_review_api.py | SIG 路由与归属配置单元测试 | | .agents/skills/sig-review/sig_ownership.json | SIG 目录归属映射表(10 个 SIG 的路径、chair、reviewer、approver) | | .agents/skills/sig-review/ref/review-checklist.md | 检视质量标准与 msmodeling 专项关注点 | | .agents/skills/README.md | Skills 索引新增 sig-review 条目 | | AGENTS.md | Agent 指南新增 sig-review skill 条目 | #### 设计要点 - **零外部依赖**:review_api.py 仅用 Python 标准库,适用于任何 agent 环境 - **SIG 路由**:最长前缀匹配 + fallback 兜底,支持 chair==author 自动改指派 reviewer、跨 SIG 双签、根目录文件标记架构共审 - **PR 变更来源**:唯一来源是 GitCode API 的 patch 字段,禁止用 git diff(避免本地分支状态干扰) - **检视意见结构化**:自动添加 【review】【类别】 前缀,按变更行数控制意见数量 - **自动移交**:每提交一条检视意见,PR 自动转回作者,SLA 计时清零 - **令牌安全**:一次性配置到 ~/.config/sig-review/config.json(权限 600),不在对话中粘贴 #### 使用方式 PR 作者推送代码后对 agent 说"请求检视",自动分析文件归属并指派 chair。chair 收到通知后说"检视PR 123"开始检视,全程自然语言,无需操作 GitCode 网页。 ------ ## 📐 Associated Test Results / 关联测试结果    ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!553 | 2 天前 | |
【同步】【非开发代码】代码从 develop 同步到 master Co-authored-by: yydyzr<liuyuncong1@huawei.com> Co-authored-by: gcw_61YBRfIt<chuzhenxing@huawei.com> Co-authored-by: 孔炳翔<1120200577@qq.com> Co-authored-by: zhengxinqian<qianzhengxin@huawei.com> Co-authored-by: hw_whx<wanghexiang7@huawei.com> Co-authored-by: jgong5<steven.gong@gmail.com> Co-authored-by: hw_whx<2952154980@qq.com> # message auto-generated for no-merge-commit merge: !330 merge master into master 【同步】【非开发代码】代码从 develop 同步到 master Created-by: AvadaKedavrua Commit-by: liujiawang;ascend-robot;AvadaKedavrua;lutean;Horacehxw;eveyin1;minghang_c;zwt__;tt0cool;elrond-g;jia_ya_nan;zhenyu_zhang;ChenHuiwen;wangshen001;Hudingyi;wendellX;Secluded_Ocean;jhon-117;yaohan404;jiangruitao;zhenghaojie;stormchasingg;panyj1993;cmh1056291129;yuyinkai1;sunguozhong;genius52;liu_jiaxu;HongMaoShuiGuai;zhengxinqian;weixin_43368449;jsez-li-bin;jgong5;wqh17101;w00609794;yydyzr;JieZhang679;sppedforcy;gcw_61YBRfIt;Jiong Gong;hw_whx;gongjiong;孔炳翔 Merged-by: ascend-robot Description: 代码从 develop 同步到 master,后续基于 master 演进,并支持打包 See merge request: Ascend/msmodeling!330 | 1 个月前 | |
feat(serving): auto fallback max batched tokens on prefill OOM Co-authored-by: jia_ya_nan<jiayanan3@h-partners.com> # message auto-generated for no-merge-commit merge: !538 merge branch_for_debug into master feat(serving): auto fallback max batched tokens on prefill OOM Created-by: jia_ya_nan Commit-by: jia_ya_nan Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 **Please describe the motivation of this PR and the goal you want to achieve through this PR.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** 当前 throughput_optimizer 的 max-batched-tokens 默认值固定为 8192,在不同输入长度和显存条件下不够灵活:用户未显式配置时,可能导致在prefill阶段无法发挥出dp的。 本 PR 的目标是让默认行为更自适应:当用户不传入 --max-batched-tokens 时,优化器根据 input_length 自动选择初始 token budget,并在 Prefill OOM 时逐级降低,从而减少手动调参成本,并更早识别无可行配置的场景。 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** - 将 --max-batched-tokens 默认值从 8192 改为 None,未传入时启用自动模式。 - 自动模式下按 4 * input_length -> 2 * input_length -> 1 * input_length 尝试 max_batched_tokens,仅在 Prefill OOM 时触发降级。 - 为 optimizer early-stop 增加原因标记,用于区分 Prefill OOM、Decode OOM 以及 TTFT/TPOT 超限。 - 对 disaggregation prefill 单 chunk 场景补齐 token budget wave 切分逻辑,使 max_batched_tokens 约束在 PD 分离场景下也一致生效。 - 同步更新 Web UI 默认值、命令生成逻辑、参数校验、用户文档和回归测试。 ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。** ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [x] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [x] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [x] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [x] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!538 | 7 天前 | |
合入evalscope插件 Co-authored-by: liu977803265<liushuai165@huawei.com> # message auto-generated for no-merge-commit merge: !515 merge master into master 【plugin】【evalscope】合入evalscope插件 Created-by: liu977803265 Commit-by: liu977803265 Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 **Please describe the motivation of this PR and the goal you want to achieve through this PR.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** 与AISBench相比,EvalScope在模型类型覆盖更全面、功能维度更丰富、生态集成更深度、评估结果更精准这几个方面有明显优势,故需要新增evalscope插件。 ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** 增加evalscope插件,作为寻优工具benchmark的一种补充 ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。**   ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [x] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!515 | 4 天前 | |
修改optix资料对于aisbench最新链接 Co-authored-by: tt0cool<xujintao8@h-partners.com> # message auto-generated for no-merge-commit merge: !558 merge master into master 修改optix资料对于aisbench最新链接 Created-by: tt0cool Commit-by: tt0cool Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [x] Bugfix(Bug 修复) - [x] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 **Please describe the motivation of this PR and the goal you want to achieve through this PR.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** 更新资料中的链接,防止失效链接误导用户 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** 将aisbench的资料链接改为github仓上的最新链接 ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。**  ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [x] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [x] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [x] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [x] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!558 | 2 天前 | |
【REFACTOR】optix optimizer 审计整改:P0 修复、loguru 结构化日志与 RunOutcome Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !518 merge optix into master 【REFACTOR】optix optimizer 审计整改:P0 修复、loguru 结构化日志与 RunOutcome Created-by: AvadaKedavrua Commit-by: liujiawang Merged-by: ascend-robot Description: ## 🔍 Motivation / 变更动机 optix optimizer 存在 P0 正确性缺陷、非结构化日志(缺少 run 上下文、重复 traceback)、子进程失败信息不完整,以及 benchmark 配置/清理路径不安全等问题。用户在真机寻优排障时难以关联日志与 CSV,脚本也无法可靠区分配置错误、baseline 失败与无可行解。 本 PR 按 [RFC: optix 服务参数寻优可靠性增强](docs/RFC/rfc_optix_optimizer_refactor_zh.md) 完成审计整改:结构化 loguru、域异常体系、CLI 单边界日志、benchmark fail-fast 与安全清理,并补充 391 项回归测试与中英文用户指南。 ------ ## 📝 Modification / 修改内容 ### 日志与可观测性 - 新增 optix/logging.py:configure_logger()、LogStage 枚举、OPTIX_LOG_LEVEL(INFO / DEBUG / TRACE,兼容 MODELEVALSTATE_LEVEL) - 控制台格式含 run_id、stage、engine;DEBUG/TRACE 附加 file:line - format_subprocess_start() / format_subprocess_failure() 统一子进程启动与失败消息(命令、退出码、日志路径、日志尾部) - main() 单边界处理:域异常与未预期错误各 log 一次后 SystemExit(1),消除 Scheduler/Optimizer 重复 traceback - monitoring_status 错误消息与 subprocess 格式对齐 ### 域异常(optix/optimizer/errors.py) | 异常 | 场景 | |------|------| | ConfigFileNotFoundError | --config 路径不存在 | | InvalidConfigError | TOML 解析失败 | | BenchmarkUnavailableError | -b 所选 benchmark 可执行文件不在 PATH | | BaselineRunError | baseline 服务/压测子进程失败(含 command、log_path、log tail) | | NoFeasibleSolutionError | PSO 结束无可行候选 | | OptimizerError | 基类,CLI 统一捕获 | ### Benchmark 策略与安全清理 - validate_benchmark_policy():启动前 fail-fast,可执行文件缺失立即报错并提示安装指引 - DEFAULT_BENCHMARK_POLICY(ais_bench)收敛至 register.py 单点定义 - normalize_benchmark_paths():vllm_benchmark.command.result_dir 为空或解析为 cwd 时,自动落到 output/vllm_benchmark/result,避免 Path("") → cwd - remove_file() 安全守卫:拒绝清理空路径、cwd、home、filesystem root(修复 benchmark 失败时误删工作目录) ### 架构与 P0 修复 - RunOutcome 统一评测结果语义;Scheduler._run_evaluation 去重 - protocols.has_* 协议检查;pathlib 与 FD context manager - enable_simulation_model() 调用修复、mindie_prepare inf 边界、BenchmarkResultError fail-fast 等 P0 项 - performance_tuner 公开别名 ### 文档 - RFC:docs/RFC/rfc_optix_optimizer_refactor_zh.md - 中英文 user guide:日志级别、退出码、排障表 - optix/optimizer/plugins/plugin.md:插件作者日志约定 - design doc 变更记录 ### 测试(391 passed) 新增/补强:test_logging.py、test_main_cli.py、test_outcome.py、test_prepare_run_plugin.py、test_mindie_prepare.py、test_enable_simulate.py、test_performance_tuner_alias.py、test_optix_optimizer_smoke.py 等;既有用例同步适配新异常与日志行为。 ------ ## 📐 Associated Test Results / 关联测试结果 bash cd msmodeling && PYTHONPATH=. uv run --with pytest python -m pytest \ tests/regression/optix/test_optimizer/ tests/smoke/test_optix_optimizer_smoke.py -q text 391 passed in ~19s 日志专项: bash PYTHONPATH=. uv run --with pytest python -m pytest \ tests/regression/optix/test_optimizer/test_logging.py -q ------ ## 🌟 Use cases / 使用说明 ### 启动寻优 bash # 推荐入口 msmodeling optix -e vllm -b ais_bench # 等价 python -m optix -e vllm -b ais_bench ### 日志级别 bash export OPTIX_LOG_LEVEL=INFO # 默认:run_id + stage export OPTIX_LOG_LEVEL=DEBUG # 附加 file:line、参数细节 export OPTIX_LOG_LEVEL=TRACE # PSO 粒子级内部日志 未设置 OPTIX_LOG_LEVEL 时回退 MODELEVALSTATE_LEVEL。 ### Benchmark 策略(-b) - 默认 -b ais_bench(DEFAULT_BENCHMARK_POLICY) - 可选 vllm_benchmark 等已注册策略 - **启动前校验**:所选策略对应可执行文件不在 PATH 时立即失败(BenchmarkUnavailableError),不再进入 baseline 后才报错 ### 错误输出与退出码 - 成功:退出码 0,输出最优参数 CSV - 失败:退出码 1,单条错误日志包含: - 失败阶段(stage)与 run_id - 子进程 **command**、**log path**、**log tail**(最近若干行) - 配置/基准类错误给出明确指引(如 benchmark 未安装、TOML 无效、无可行解) 排障建议:先 OPTIX_LOG_LEVEL=DEBUG 复现,对照 CSV error 列与服务/压测日志。 ### 自验证   看看这日志,多舒服 ------ ## ✅ Checklist / 检查列表 - [x] Bug 修复由单元测试覆盖(remove_file 安全守卫、normalize_benchmark_paths、validate_benchmark_policy) - [x] 修改由完整 regression + smoke 覆盖(391 tests) - [x] 文档已更新(RFC、user guide、plugin.md、design doc) - [x] 代码文件无中文注释 See merge request: Ascend/msmodeling!518 | 10 天前 | |
feat(pre-commit): 集成 Gitleaks 本地离线密钥扫描功能 Co-authored-by: eveyin1<qianyin2022@hotmail.com> # message auto-generated for no-merge-commit merge: !541 merge update into master feat(pre-commit): 集成 Gitleaks 本地离线密钥扫描功能 Created-by: eveyin1 Commit-by: eveyin1 Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [x] Other(其他) ## 🔍 Motivation / 变更动机 **Please describe the motivation of this PR and the goal you want to achieve through this PR.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** 密钥泄露是常见的安全风险,开发者可能在代码中硬编码 AK/SK、Token 等敏感信息 通过 pre-commit hook 在提交前拦截,从源头防止凭证进入 Git 历史 使用本地离线二进制扫描,无需网络连接,不依赖外部服务 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** .pre-commit-config.yaml:新增 gitleaks-offline-scan local hook,使用本地 gitleaks 二进制执行 protect 命令,在 pre-commit 阶段对暂存文件进行密钥扫描 pre-commit/.gitleaks.toml:新增 Gitleaks 配置文件,继承官方内置全套检测规则(useDefault = true),并提供自定义规则、全局白名单、行内屏蔽等扩展配置示例 ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。** ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!541 | 8 天前 | |
【FEAT】build.py test 无 test_map 时默认跑全量 pytest Co-authored-by: AvadaKedavrua<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !557 merge test into master 【FEAT】build.py test 无 test_map 时默认跑全量 pytest Created-by: AvadaKedavrua Commit-by: AvadaKedavrua Merged-by: ascend-robot Description: ## 修改原因 本地执行 python3 build.py test 时强制要求 MSMODELING_TEST_MAP_PATH,对日常全量回归不友好;希望未传该变量时默认跑全量 pytest tests(markers 沿用 pyproject.toml),传入后再走 CI Gate。 ## 修改内容 - scripts/helpers/build/:拆分为 main.py(分发)、run_build.py、run_test.py;run_test 按是否解析到 test_map_path 分流——无 map 执行 python -m pytest tests(markers 沿用 pyproject.toml,不覆盖 addopts);有 map 走 CI Gate(先校验 map 文件与 run_ci_gate.sh) - tests/regression/scripts/helpers/build/:覆盖正常/空白 env/全量失败码/CI Gate 路径等 - scripts/README.md、build.py:同步文档与入口说明 - uv.lock:一并纳入 ## 自验证 ### 无 test_map 走全量 pytest(markers 来自 pyproject) 目的:确认未设置 MSMODELING_TEST_MAP_PATH 时启动 pytest tests,并读取 pyproject.toml addopts(deselected 对应 npu/nightly/network) 步骤: 1. 使用仓库 venv Python 启动 test(限时截取启动屏显) bash unset MSMODELING_TEST_MAP_PATH timeout 60 .venv/bin/python build.py test 结果: text Checked 108 packages in 1ms INFO 07-14 14:18:29.753 [main.py:140] running: /root/workspace/gitcode/msmodeling/.venv/bin/python -m pytest tests ============================= test session starts ============================== platform linux -- Python 3.12.13, pytest-9.0.3, pluggy-1.6.0 rootdir: /root/workspace/gitcode/msmodeling configfile: pyproject.toml plugins: xdist-3.8.0, cov-7.1.0, anyio-4.13.0 collected 5055 items / 136 deselected / 4919 selected ### build helper 回归单测 目的:守护全量/CI Gate 双路径及边缘场景 步骤: 1. 运行 build.main 回归 bash uv run --group ci pytest tests/regression/scripts/helpers/build/test_main.py -q --tb=line 结果: text .......................................... [100%] 42 passed in 1.22s ### CI Gate 路径:map 文件缺失 fail-fast 目的:传入不存在的 test_map 时在 bootstrap 前失败 步骤: 1. 指定缺失 map bash unset MSMODELING_TEST_MAP_PATH python3 build.py test -e test_map_path=/tmp/does-not-exist-map.json 结果: text ERROR 07-14 14:16:31.039 [main.py:300] test_map_path is not a file: /tmp/does-not-exist-map.json ### test_map 解析:unset / blank / set / extra 目的:空白环境变量视为未设置,优先 -e test_map_path 步骤: 1. 解析函数冒烟 bash python3 - <<'PY' import os from scripts.helpers.build.argv import BuildOptions from scripts.helpers.build.main import _resolve_test_map_path os.environ.pop("MSMODELING_TEST_MAP_PATH", None) opts = BuildOptions(is_test=True, is_local=False, version=None, version_explicit=False, extras={}) print("unset ->", repr(_resolve_test_map_path(opts))) os.environ["MSMODELING_TEST_MAP_PATH"] = " " print("blank ->", repr(_resolve_test_map_path(opts))) os.environ["MSMODELING_TEST_MAP_PATH"] = "/tmp/map.json" print("set ->", repr(_resolve_test_map_path(opts))) print("extra ->", repr(_resolve_test_map_path(BuildOptions(is_test=True, is_local=False, version=None, version_explicit=False, extras={"test_map_path": "/data/x.json"})))) PY 结果: text unset -> None blank -> None set -> '/tmp/map.json' extra -> '/data/x.json'   See merge request: Ascend/msmodeling!557 | 2 天前 | |
bugfix:修正PD混部的输出吞吐计算 Co-authored-by: lutean<lutean1@huawei.com> # message auto-generated for no-merge-commit merge: !552 merge master into master bugfix:修正PD混部的输出吞吐计算 Created-by: lutean Commit-by: lutean Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [x] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 **Please describe the motivation of this PR and the goal you want to achieve through this PR.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** 修复聚合模式下输出吞吐计算重复计入首 Token 延迟(TTFT)的问题。原实现将已包含 TTFT 的 TPOT 再次与 TTFT 相加,导致端到端延迟被高估、输出吞吐量被低估。 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** 引入端到端延迟 e2el = ttft + decode_latency * output_length,基于该值统一计算 TPOT 和输出吞吐量,避免重复计算 TTFT;同时将聚合吞吐优化回归测试中的期望值更新为 932.8358209。 ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。** 见关联issue ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!552 | 3 天前 | |
data(perf-db): add verified GLM5 A3 operator samples Co-authored-by: Secluded_Ocean<tangchuxiao0709@qq.com> # message auto-generated for no-merge-commit merge: !568 merge codex/glm5-measured-op-database into master data(perf-db): add verified GLM5 A3 operator samples Created-by: Secluded_Ocean Commit-by: Secluded_Ocean Merged-by: ascend-robot Description: Closes #244 ## 修改背景 为 GLM5.1 TensorCast 前向仿真与 ServingCast 吞吐寻优补充 A3 实测算子数据库,保留当前严格六场景已验证的完整数据库快照。 ## 环境 - Device: ATLAS_800_A3_752T_128G_DIE - vLLM Ascend: 0.18.0 - Torch: 2.9.0 - CANN: 8.5 ## 修改内容 - 更新目标版本目录下 108 个 CSV(104 个更新、4 个新增)。 - 快照共 20,824 行数据,与六场景 6/6 源工作区逐文件 SHA256 一致。 - 新增 MemSet、batch_matmul_transpose_0、mla_preprocess_0_mix_aic、reduce_scatterAicpuKernel 数据文件。 ## 验证结果 - CSV 解析及乱码检查:108 files / 20,824 rows / 0 errors。 - Schema/invariant:15 passed。 - git diff --check:passed。 - git lfs fsck:OK;108/108 LFS objects uploaded。 - GLM5 strict-context:6 passed。 - 5K prefill:M6 wall 95.84%,M7 94.53%,M8 96.04%。 - 5K decode:M6 wall 103.02%,M7 92.71%,M8 96.66%。 - 10K prefill:M6 wall 105.74%,M7 93.80%,M8 94.04%。 - 10K decode:M6 wall 86.57%,M7 89.49%,M8 86.84%。 - 20K prefill:M6 wall 98.10%,M7 94.23%,M8 98.31%。 - 20K decode:M6 wall 90.54%,M7 90.12%,M8 90.85%。 ## 非范围 本 PR 不包含 op_mapping.yaml、TensorCast/ServingCast 代码、工具链、测试、文档、HCCL 或旧版本数据库。查询/映射与算子工具链改动将由后续独立 PR 提交。 See merge request: Ascend/msmodeling!568 | 11 小时前 | |
fix(diffusers): allow remote snapshot symlinks Co-authored-by: minghang_c<chiminghang@h-partners.com> # message auto-generated for no-merge-commit merge: !548 merge pr/diffusers-remote-snapshot-symlink into master fix(diffusers): allow remote snapshot symlinks Created-by: minghang_c Commit-by: minghang_c Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。 **PR Type / PR类型** - [ ] Feature(功能新增) - [x] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 Fixes #225. Hugging Face Hub 按设计将 snapshot 文件保存为指向同一仓库 blobs/ 目录的符号链接。远端 repo ID 经 resolve_diffusers_model_path() 解析为本地缓存路径后,load_config_from_file() 会丢失其远端来源信息,并错误地套用用户本地目录的严格 symlink 校验,导致远端 Diffusers 模型加载失败。 本 PR 的目标是允许 resolver 生成的远端 snapshot 使用 Hugging Face 标准缓存布局,同时保持用户直接传入本地目录时的 fail-closed 安全校验。 ------ ## 📝 Modification / 修改内容 - 根据原始 model_id 是否为用户提供的本地目录,决定是否启用严格本地路径校验。 - 将该来源信息传递给 load_config_from_file();仅 resolver 生成的远端 snapshot 跳过本地 symlink 禁止规则。 - 添加 Hugging Face snapshots/.../config.json -> blobs/... 布局的回归测试。 - 同一测试确认用户直接传入含符号链接的本地模型目录仍会被拒绝。 变更仅涉及: - tensor_cast/diffusers/diffusers_model.py - tests/regression/tensor_cast/test_diffusers_remote_builder.py ------ ## 📐 Associated Test Results / 关联测试结果 text 27 passed in 0.08s 执行范围: bash uv run --frozen --group ci pytest \ tests/regression/tensor_cast/test_diffusers_model_resolver.py \ tests/regression/tensor_cast/test_diffusers_remote_builder.py \ tests/regression/tensor_cast/test_model_source_security.py 针对两个变更文件执行了 pre-commit。trailing whitespace、EOF、merge conflict、private key、ruff、codespell、pylint、bandit 和 typos 检查均通过。本地 gitleaks-offline-scan 未执行,因为仓库要求的 ./gitleaks 离线二进制在当前环境中不存在。 在包含 Wan2.2 compile 支持的集成分支上,最初触发问题的端到端命令修复后已运行成功。 ------ ## 🌟 Use cases (Optional) / 使用案例(可选) 使用 Hugging Face repo ID 加载采用标准 content-addressed cache 布局的 Diffusers 模型,例如 Wan-AI/Wan2.2-T2V-A14B。 ------ ## ✅ Checklist / 检查列表 **Before PR**: - [x] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [x] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。 - [x] All relevant documentation has been updated to reflect these changes. / 此修复不改变公共 API,无需更新用户文档。 - [x] Please ensure code files contain no Chinese comments. / 代码文件中未新增中文注释。 See merge request: Ascend/msmodeling!548 | 2 天前 | |
Adapt GLM-5.2 IndexShare execution Model GLM-5.2 index sharing explicitly so full layers own indexer work while shared layers reuse prior top-k state, and add the GLM-5.2 model config fallback used by shape generation. Signed-off-by: minghang_c <chiminghang@h-partners.com> Co-authored-by: minghang_c<chiminghang@h-partners.com> # message auto-generated for no-merge-commit merge: !535 merge glm-5-2-adaption into master Adapt GLM-5.2 IndexShare execution Created-by: minghang_c Commit-by: minghang_c Merged-by: ascend-robot Description: Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [x] Refactor(代码重构) - [x] Perf(性能优化) - [x] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 Adapt GLM-5.2 on top of the existing GLM5/GLM-5.1 support. GLM-5.2 keeps the glm_moe_dsa architecture but introduces IndexShare, where shared sparse-attention layers reuse the previous full layer's top-k indices instead of running a DSA indexer every layer. Modeling every layer as a full indexer overestimates indexer latency and cache memory. ------ ## 📝 Modification / 修改内容 - Add GLM5-specific IndexShare helpers and runtime handling so full layers execute the indexer and shared layers consume prev_topk_indices. - Extend GLM5 MTP indexer_types with the IndexShare pattern and avoid layer-reuse wrappers on layers that carry top-k flow. - Allocate sparse-attention indexer cache only for GLM-5.2 full/source layers while keeping DeepSeek V4 compressed indexer-cache sizing separate. - Add GLM-5.2 static shape-grid fallback config and regression coverage for GLM5, input generation, repetition, and CLI model config paths. ------ ## 📐 Associated Test Results / 关联测试结果 bash uv run --frozen --with pytest --with parameterized python -m pytest tests/regression/tensor_cast/test_glm5.py tests/regression/tensor_cast/test_mla.py tests/regression/tensor_cast/test_input_generator.py tests/regression/tensor_cast/test_repetition.py tests/regression/cli/test_shape_grid_model_configs.py tests/regression/cli/test_model_configs.py Result: text 99 passed, 2 deselected in 29.08s Additional smoke test: bash PATH="$PWD/.venv/bin:$PATH" python -m cli.inference.text_generate zai-org/GLM-5.2 --device ATLAS_800_A3_752T_128G_DIE --num-devices 16 --tp-size 16 --dp-size 1 --ep-size 16 --context-length 61000 --query-length 4096 --num-queries 1 --num-mtp-tokens 3 --compile --quantize-linear-action W4A8_STATIC --dump-input-shapes Result included: text Model compilation and execution time: 209.572 s Total time for analytic: 1.675s TPS/Device: 152.9 token/s ------ ## 🌟 Use cases (Optional) / 使用案例(可选) - Analytic/performance modeling for zai-org/GLM-5.2 with sparse attention IndexShare and MTP enabled. ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [x] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [x] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!535 | 10 天前 | |
fix(docs): 修复文档 markdownlint/link 检查问题并更新支持说明 Co-authored-by: eveyin1<qianyin2022@hotmail.com> # message auto-generated for no-merge-commit merge: !559 merge master into master fix(docs): 修复文档 markdownlint/link 检查问题并更新支持说明 Created-by: eveyin1 Commit-by: eveyin1 Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [x] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 **Please describe the motivation of this PR and the goal you want to achieve through this PR.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** CI 的 markdownlint 与 link-validity-check 在多个文档上报错。主要问题包括: 链接失效:web_ui/README.md 环境变量锚点指向错误;rfc_optix_param_recommend_skill_zh.md 引用不存在的 serviceparam_optimizer_instruct.md;Qwen3.5 RFC 引用未入库的内部文档。 Markdown 格式:多余空行(MD012)、列表前后缺空行(MD032)、代码块未指定语言(MD040)、表格列数不一致(MD056)、行内代码首尾空格(MD038)、文件末尾缺换行(MD047)、标题/表格格式(MD022/MD041/MD058)。 文档内容同步:README 与支持矩阵需补充 Qwen3.6 / Qwen3.6 MoE、GLM5.2 模型支持说明。 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** | 文件 | 修复项 | |------|--------| | web_ui/README.md | 环境变量链接改为 ../scripts/README.md#environment-variables | | docs/RFC/rfc_representative_layer_reuse_optimization_zh.md | MD012 删除文末多余空行 | | docs/RFC/rfc_optix_param_recommend_skill_zh.md | MD032/MD040;链接改为 optix_user_guide.md | | docs/RFC/rfc_msmodeling_env_installer_skill_zh.md | MD056 表格列数对齐 | | docs/RFC/rfc_general_model_config_loader_zh/en.md | MD040 代码块加 text | | docs/RFC/rfc_add_qwen3.5_support_zh/en.md | MD038/MD040/MD047;移除失效本地链接 | | docs/RFC/rfc_add_deepseekv4_support_en.md | MD047 文件末尾换行 | | docs/design/web_ui_frontend_design.md | MD022/MD058 | | docs/design/glm5-tensorcast-adaptation-design.md | MD041/MD022/MD058/MD047 | ### 模型支持文档更新 - README.md:新增 Qwen3.6 / Qwen3.6 MoE、GLM5.2 支持条目 - docs/zh/user_guide/support_matrix/support_matrix_user_guide.md:同步支持矩阵 - docs/en/user_guide/support_matrix/support_matrix_user_guide.md:同步支持矩阵 ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。** ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!559 | 2 天前 | |
【同步】【非开发代码】代码从 develop 同步到 master Co-authored-by: yydyzr<liuyuncong1@huawei.com> Co-authored-by: gcw_61YBRfIt<chuzhenxing@huawei.com> Co-authored-by: 孔炳翔<1120200577@qq.com> Co-authored-by: zhengxinqian<qianzhengxin@huawei.com> Co-authored-by: hw_whx<wanghexiang7@huawei.com> Co-authored-by: jgong5<steven.gong@gmail.com> Co-authored-by: hw_whx<2952154980@qq.com> # message auto-generated for no-merge-commit merge: !330 merge master into master 【同步】【非开发代码】代码从 develop 同步到 master Created-by: AvadaKedavrua Commit-by: liujiawang;ascend-robot;AvadaKedavrua;lutean;Horacehxw;eveyin1;minghang_c;zwt__;tt0cool;elrond-g;jia_ya_nan;zhenyu_zhang;ChenHuiwen;wangshen001;Hudingyi;wendellX;Secluded_Ocean;jhon-117;yaohan404;jiangruitao;zhenghaojie;stormchasingg;panyj1993;cmh1056291129;yuyinkai1;sunguozhong;genius52;liu_jiaxu;HongMaoShuiGuai;zhengxinqian;weixin_43368449;jsez-li-bin;jgong5;wqh17101;w00609794;yydyzr;JieZhang679;sppedforcy;gcw_61YBRfIt;Jiong Gong;hw_whx;gongjiong;孔炳翔 Merged-by: ascend-robot Description: 代码从 develop 同步到 master,后续基于 master 演进,并支持打包 See merge request: Ascend/msmodeling!330 | 1 个月前 | |
【FEAT】新增根目录 build.py 作为部门统一构建/测试入口 Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !485 merge build_all_in_one into master 【FEAT】新增根目录 build.py 作为部门统一构建/测试入口 Created-by: AvadaKedavrua Commit-by: liujiawang Merged-by: ascend-robot Description: ## 修改原因 部门工具仓规范要求仓库根目录提供统一 build.py 入口。msmodeling 需在本地与 CI 中以稳定 CLI 委托现有 scripts/build.sh(构建 wheel)与 scripts/run_ci_gate.sh(增量门禁测试),并支持 -v 指定制品版本且与 uv build 日志一致。 ## 修改内容 - 新增根目录 [build.py](build.py) 及 [scripts/helpers/build/](scripts/helpers/build/)(argv.py 参数解析、main.py 流程编排) - 默认构建:委托 bash scripts/build.sh,wheel 输出到 artifacts/wheels/,写入 artifacts/build-manifest.json - python build.py test:委托 bash scripts/run_ci_gate.sh,日志/摘要写入 artifacts/test-reports/ - -v/--version:构建前 uv version <ver> --frozen 临时写入 pyproject.toml,finally 恢复原版本;不再仅重命名 whl - fail-fast:uv 不在 PATH、test_map_path 非文件时提前退出;version staging / restore 失败有明确退出码 - local token 解析但无行为分支(纯 Python 仓规范兼容) - 新增 tests/regression/scripts/helpers/build/ 回归(41 用例);gate_policy.yaml 增加 build.py 配置触发项;.gitignore 忽略 artifacts/ - 更新 [scripts/README.md](scripts/README.md) 说明入口与 uv run python build.py -v 用法 ## 自验证 ### 回归测试 目的:验证 build 模块参数解析、版本 staging/restore、fail-fast 与委托逻辑。 步骤: 1. 运行 build 回归套件 bash uv run pytest tests/regression/scripts/helpers/build/ -q --tb=short 结果: text ......................................... [100%] 41 passed in 0.26s ### 指定版本构建 wheel 目的:验证 -v 时 uv build 日志与 whl 文件名均为指定版本,且 pyproject.toml 构建后恢复。 步骤: 1. 清理并构建 bash rm -rf artifacts/wheels/* uv run python build.py -v 26.1.2 2. 检查 pyproject 版本 bash grep '^version' pyproject.toml 结果: text INFO 06-30 10:05:56.446 [main.py:66] setting project version to 26.1.2 msmodeling 0.2.0 => 26.1.2 INFO 06-30 10:05:56.463 [main.py:84] running: bash /root/workspace/gitcode/msmodeling-test/scripts/build.sh Building wheel... Successfully built artifacts/wheels/msmodeling-26.1.2-py3-none-any.whl Built wheel: /root/workspace/gitcode/msmodeling-test/artifacts/wheels/msmodeling-26.1.2-py3-none-any.whl INFO 06-30 10:05:57.534 [main.py:182] restoring project version to 0.2.0 INFO 06-30 10:05:57.534 [main.py:66] setting project version to 0.2.0 msmodeling 26.1.2 => 0.2.0 version = "0.2.0" ### test 模式 fail-fast 目的:未提供 test_map 时应在启动 ci_gate 前失败。 步骤: 1. 无 test_map 运行 test bash uv run python build.py test 结果: text ERROR 06-30 10:06:04.247 [main.py:222] test requires test_map_path via --extra test_map_path=... or MSMODELING_TEST_MAP_PATH exit=1 See merge request: Ascend/msmodeling!485 | 17 天前 | |
feat(pre-commit): 集成 Gitleaks 本地离线密钥扫描功能 Co-authored-by: eveyin1<qianyin2022@hotmail.com> # message auto-generated for no-merge-commit merge: !541 merge update into master feat(pre-commit): 集成 Gitleaks 本地离线密钥扫描功能 Created-by: eveyin1 Commit-by: eveyin1 Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [x] Other(其他) ## 🔍 Motivation / 变更动机 **Please describe the motivation of this PR and the goal you want to achieve through this PR.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** 密钥泄露是常见的安全风险,开发者可能在代码中硬编码 AK/SK、Token 等敏感信息 通过 pre-commit hook 在提交前拦截,从源头防止凭证进入 Git 历史 使用本地离线二进制扫描,无需网络连接,不依赖外部服务 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** .pre-commit-config.yaml:新增 gitleaks-offline-scan local hook,使用本地 gitleaks 二进制执行 protect 命令,在 pre-commit 阶段对暂存文件进行密钥扫描 pre-commit/.gitleaks.toml:新增 Gitleaks 配置文件,继承官方内置全套检测规则(useDefault = true),并提供自定义规则、全局白名单、行内屏蔽等扩展配置示例 ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。** ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!541 | 8 天前 | |
feat(sig-review): 新增 SIG 化代码检视 skill Co-authored-by: jhon-117<fangkai15@huawei.com> # message auto-generated for no-merge-commit merge: !553 merge feat/sig-review into master feat(sig-review): 新增 SIG 化代码检视 skill Created-by: jhon-117 Commit-by: jhon-117 Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 新增AI开发规范配套工具 ------ ## 📝 Modification / 修改内容 #### 功能概述 新增 sig-review skill,让 PR 作者和检视者通过自然语言与 AI agent 交互,完成从"请求检视"到"检视完成移交"的全流程。**无需安装任何外部工具**,全程自然语言驱动。 msmodeling 按目录划分为 10 个子 SIG,本 skill 自动将 PR 路由到正确的 SIG 并指派检视人员,确保每个 PR 有人及时审查、责任传递不断链。 #### 核心能力 | 能力 | 触发词 | 说明 | |------|--------|------| | 请求检视 | "请求检视" | 分析 PR 变更文件归属哪个 SIG,指派对应 chair | | 查看待检视 | "我有哪些待检视PR" | 列出当前分配给自己的所有待检视 PR | | 代码检视 | "检视PR 123" | 获取 diff、分析问题、提交结构化检视意见 | | 查看状态 | "PR 123 状态" | 查看 PR 的审查人、标签、状态 | | 转交检视 | "转给 XXX" | 将检视责任转给其他人 | | 完成移交 | "完成检视" | 通过则移交给 approver,有意见则转回作者修改 | #### 变更文件 | 文件 | 说明 | |------|------| | .agents/skills/sig-review/SKILL.md | Skill 定义:触发条件、检视流程、评论格式规范、安全规则 | | .agents/skills/sig-review/scripts/review_api.py | 自包含 GitCode API 工具(零外部依赖,仅 Python 标准库),含 auth/fetch/assign/list/status/comment/handoff/complete/verdict/withdraw 共 11 个命令 | | .agents/skills/sig-review/scripts/test_review_api.py | SIG 路由与归属配置单元测试 | | .agents/skills/sig-review/sig_ownership.json | SIG 目录归属映射表(10 个 SIG 的路径、chair、reviewer、approver) | | .agents/skills/sig-review/ref/review-checklist.md | 检视质量标准与 msmodeling 专项关注点 | | .agents/skills/README.md | Skills 索引新增 sig-review 条目 | | AGENTS.md | Agent 指南新增 sig-review skill 条目 | #### 设计要点 - **零外部依赖**:review_api.py 仅用 Python 标准库,适用于任何 agent 环境 - **SIG 路由**:最长前缀匹配 + fallback 兜底,支持 chair==author 自动改指派 reviewer、跨 SIG 双签、根目录文件标记架构共审 - **PR 变更来源**:唯一来源是 GitCode API 的 patch 字段,禁止用 git diff(避免本地分支状态干扰) - **检视意见结构化**:自动添加 【review】【类别】 前缀,按变更行数控制意见数量 - **自动移交**:每提交一条检视意见,PR 自动转回作者,SLA 计时清零 - **令牌安全**:一次性配置到 ~/.config/sig-review/config.json(权限 600),不在对话中粘贴 #### 使用方式 PR 作者推送代码后对 agent 说"请求检视",自动分析文件归属并指派 chair。chair 收到通知后说"检视PR 123"开始检视,全程自然语言,无需操作 GitCode 网页。 ------ ## 📐 Associated Test Results / 关联测试结果    ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!553 | 2 天前 | |
【同步】【非开发代码】代码从 develop 同步到 master Co-authored-by: yydyzr<liuyuncong1@huawei.com> Co-authored-by: gcw_61YBRfIt<chuzhenxing@huawei.com> Co-authored-by: 孔炳翔<1120200577@qq.com> Co-authored-by: zhengxinqian<qianzhengxin@huawei.com> Co-authored-by: hw_whx<wanghexiang7@huawei.com> Co-authored-by: jgong5<steven.gong@gmail.com> Co-authored-by: hw_whx<2952154980@qq.com> # message auto-generated for no-merge-commit merge: !330 merge master into master 【同步】【非开发代码】代码从 develop 同步到 master Created-by: AvadaKedavrua Commit-by: liujiawang;ascend-robot;AvadaKedavrua;lutean;Horacehxw;eveyin1;minghang_c;zwt__;tt0cool;elrond-g;jia_ya_nan;zhenyu_zhang;ChenHuiwen;wangshen001;Hudingyi;wendellX;Secluded_Ocean;jhon-117;yaohan404;jiangruitao;zhenghaojie;stormchasingg;panyj1993;cmh1056291129;yuyinkai1;sunguozhong;genius52;liu_jiaxu;HongMaoShuiGuai;zhengxinqian;weixin_43368449;jsez-li-bin;jgong5;wqh17101;w00609794;yydyzr;JieZhang679;sppedforcy;gcw_61YBRfIt;Jiong Gong;hw_whx;gongjiong;孔炳翔 Merged-by: ascend-robot Description: 代码从 develop 同步到 master,后续基于 master 演进,并支持打包 See merge request: Ascend/msmodeling!330 | 1 个月前 | |
feat(sig-review): 新增 SIG 化代码检视 skill Co-authored-by: jhon-117<fangkai15@huawei.com> # message auto-generated for no-merge-commit merge: !553 merge feat/sig-review into master feat(sig-review): 新增 SIG 化代码检视 skill Created-by: jhon-117 Commit-by: jhon-117 Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [x] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 新增AI开发规范配套工具 ------ ## 📝 Modification / 修改内容 #### 功能概述 新增 sig-review skill,让 PR 作者和检视者通过自然语言与 AI agent 交互,完成从"请求检视"到"检视完成移交"的全流程。**无需安装任何外部工具**,全程自然语言驱动。 msmodeling 按目录划分为 10 个子 SIG,本 skill 自动将 PR 路由到正确的 SIG 并指派检视人员,确保每个 PR 有人及时审查、责任传递不断链。 #### 核心能力 | 能力 | 触发词 | 说明 | |------|--------|------| | 请求检视 | "请求检视" | 分析 PR 变更文件归属哪个 SIG,指派对应 chair | | 查看待检视 | "我有哪些待检视PR" | 列出当前分配给自己的所有待检视 PR | | 代码检视 | "检视PR 123" | 获取 diff、分析问题、提交结构化检视意见 | | 查看状态 | "PR 123 状态" | 查看 PR 的审查人、标签、状态 | | 转交检视 | "转给 XXX" | 将检视责任转给其他人 | | 完成移交 | "完成检视" | 通过则移交给 approver,有意见则转回作者修改 | #### 变更文件 | 文件 | 说明 | |------|------| | .agents/skills/sig-review/SKILL.md | Skill 定义:触发条件、检视流程、评论格式规范、安全规则 | | .agents/skills/sig-review/scripts/review_api.py | 自包含 GitCode API 工具(零外部依赖,仅 Python 标准库),含 auth/fetch/assign/list/status/comment/handoff/complete/verdict/withdraw 共 11 个命令 | | .agents/skills/sig-review/scripts/test_review_api.py | SIG 路由与归属配置单元测试 | | .agents/skills/sig-review/sig_ownership.json | SIG 目录归属映射表(10 个 SIG 的路径、chair、reviewer、approver) | | .agents/skills/sig-review/ref/review-checklist.md | 检视质量标准与 msmodeling 专项关注点 | | .agents/skills/README.md | Skills 索引新增 sig-review 条目 | | AGENTS.md | Agent 指南新增 sig-review skill 条目 | #### 设计要点 - **零外部依赖**:review_api.py 仅用 Python 标准库,适用于任何 agent 环境 - **SIG 路由**:最长前缀匹配 + fallback 兜底,支持 chair==author 自动改指派 reviewer、跨 SIG 双签、根目录文件标记架构共审 - **PR 变更来源**:唯一来源是 GitCode API 的 patch 字段,禁止用 git diff(避免本地分支状态干扰) - **检视意见结构化**:自动添加 【review】【类别】 前缀,按变更行数控制意见数量 - **自动移交**:每提交一条检视意见,PR 自动转回作者,SLA 计时清零 - **令牌安全**:一次性配置到 ~/.config/sig-review/config.json(权限 600),不在对话中粘贴 #### 使用方式 PR 作者推送代码后对 agent 说"请求检视",自动分析文件归属并指派 chair。chair 收到通知后说"检视PR 123"开始检视,全程自然语言,无需操作 GitCode 网页。 ------ ## 📐 Associated Test Results / 关联测试结果    ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!553 | 2 天前 | |
fix(docs): 修复文档 markdownlint/link 检查问题并更新支持说明 Co-authored-by: eveyin1<qianyin2022@hotmail.com> # message auto-generated for no-merge-commit merge: !559 merge master into master fix(docs): 修复文档 markdownlint/link 检查问题并更新支持说明 Created-by: eveyin1 Commit-by: eveyin1 Merged-by: ascend-robot Description: # PR Template Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [ ] Bugfix(Bug 修复) - [x] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [ ] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 **Please describe the motivation of this PR and the goal you want to achieve through this PR.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** CI 的 markdownlint 与 link-validity-check 在多个文档上报错。主要问题包括: 链接失效:web_ui/README.md 环境变量锚点指向错误;rfc_optix_param_recommend_skill_zh.md 引用不存在的 serviceparam_optimizer_instruct.md;Qwen3.5 RFC 引用未入库的内部文档。 Markdown 格式:多余空行(MD012)、列表前后缺空行(MD032)、代码块未指定语言(MD040)、表格列数不一致(MD056)、行内代码首尾空格(MD038)、文件末尾缺换行(MD047)、标题/表格格式(MD022/MD041/MD058)。 文档内容同步:README 与支持矩阵需补充 Qwen3.6 / Qwen3.6 MoE、GLM5.2 模型支持说明。 ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** | 文件 | 修复项 | |------|--------| | web_ui/README.md | 环境变量链接改为 ../scripts/README.md#environment-variables | | docs/RFC/rfc_representative_layer_reuse_optimization_zh.md | MD012 删除文末多余空行 | | docs/RFC/rfc_optix_param_recommend_skill_zh.md | MD032/MD040;链接改为 optix_user_guide.md | | docs/RFC/rfc_msmodeling_env_installer_skill_zh.md | MD056 表格列数对齐 | | docs/RFC/rfc_general_model_config_loader_zh/en.md | MD040 代码块加 text | | docs/RFC/rfc_add_qwen3.5_support_zh/en.md | MD038/MD040/MD047;移除失效本地链接 | | docs/RFC/rfc_add_deepseekv4_support_en.md | MD047 文件末尾换行 | | docs/design/web_ui_frontend_design.md | MD022/MD058 | | docs/design/glm5-tensorcast-adaptation-design.md | MD041/MD022/MD058/MD047 | ### 模型支持文档更新 - README.md:新增 Qwen3.6 / Qwen3.6 MoE、GLM5.2 支持条目 - docs/zh/user_guide/support_matrix/support_matrix_user_guide.md:同步支持矩阵 - docs/en/user_guide/support_matrix/support_matrix_user_guide.md:同步支持矩阵 ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。** ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** ------ ## ✅ Checklist / 检查列表 **Before PR**: - [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [ ] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [ ] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!559 | 2 天前 | |
【FEAT】build.py test 无 test_map 时默认跑全量 pytest Co-authored-by: AvadaKedavrua<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !557 merge test into master 【FEAT】build.py test 无 test_map 时默认跑全量 pytest Created-by: AvadaKedavrua Commit-by: AvadaKedavrua Merged-by: ascend-robot Description: ## 修改原因 本地执行 python3 build.py test 时强制要求 MSMODELING_TEST_MAP_PATH,对日常全量回归不友好;希望未传该变量时默认跑全量 pytest tests(markers 沿用 pyproject.toml),传入后再走 CI Gate。 ## 修改内容 - scripts/helpers/build/:拆分为 main.py(分发)、run_build.py、run_test.py;run_test 按是否解析到 test_map_path 分流——无 map 执行 python -m pytest tests(markers 沿用 pyproject.toml,不覆盖 addopts);有 map 走 CI Gate(先校验 map 文件与 run_ci_gate.sh) - tests/regression/scripts/helpers/build/:覆盖正常/空白 env/全量失败码/CI Gate 路径等 - scripts/README.md、build.py:同步文档与入口说明 - uv.lock:一并纳入 ## 自验证 ### 无 test_map 走全量 pytest(markers 来自 pyproject) 目的:确认未设置 MSMODELING_TEST_MAP_PATH 时启动 pytest tests,并读取 pyproject.toml addopts(deselected 对应 npu/nightly/network) 步骤: 1. 使用仓库 venv Python 启动 test(限时截取启动屏显) bash unset MSMODELING_TEST_MAP_PATH timeout 60 .venv/bin/python build.py test 结果: text Checked 108 packages in 1ms INFO 07-14 14:18:29.753 [main.py:140] running: /root/workspace/gitcode/msmodeling/.venv/bin/python -m pytest tests ============================= test session starts ============================== platform linux -- Python 3.12.13, pytest-9.0.3, pluggy-1.6.0 rootdir: /root/workspace/gitcode/msmodeling configfile: pyproject.toml plugins: xdist-3.8.0, cov-7.1.0, anyio-4.13.0 collected 5055 items / 136 deselected / 4919 selected ### build helper 回归单测 目的:守护全量/CI Gate 双路径及边缘场景 步骤: 1. 运行 build.main 回归 bash uv run --group ci pytest tests/regression/scripts/helpers/build/test_main.py -q --tb=line 结果: text .......................................... [100%] 42 passed in 1.22s ### CI Gate 路径:map 文件缺失 fail-fast 目的:传入不存在的 test_map 时在 bootstrap 前失败 步骤: 1. 指定缺失 map bash unset MSMODELING_TEST_MAP_PATH python3 build.py test -e test_map_path=/tmp/does-not-exist-map.json 结果: text ERROR 07-14 14:16:31.039 [main.py:300] test_map_path is not a file: /tmp/does-not-exist-map.json ### test_map 解析:unset / blank / set / extra 目的:空白环境变量视为未设置,优先 -e test_map_path 步骤: 1. 解析函数冒烟 bash python3 - <<'PY' import os from scripts.helpers.build.argv import BuildOptions from scripts.helpers.build.main import _resolve_test_map_path os.environ.pop("MSMODELING_TEST_MAP_PATH", None) opts = BuildOptions(is_test=True, is_local=False, version=None, version_explicit=False, extras={}) print("unset ->", repr(_resolve_test_map_path(opts))) os.environ["MSMODELING_TEST_MAP_PATH"] = " " print("blank ->", repr(_resolve_test_map_path(opts))) os.environ["MSMODELING_TEST_MAP_PATH"] = "/tmp/map.json" print("set ->", repr(_resolve_test_map_path(opts))) print("extra ->", repr(_resolve_test_map_path(BuildOptions(is_test=True, is_local=False, version=None, version_explicit=False, extras={"test_map_path": "/data/x.json"})))) PY 结果: text unset -> None blank -> None set -> '/tmp/map.json' extra -> '/data/x.json'   See merge request: Ascend/msmodeling!557 | 2 天前 | |
【FIX】build.py 导入链去三方依赖并非交互自举 uv Co-authored-by: AvadaKedavrua<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !546 merge fix/build-py-bootstrap into master 【FIX】build.py 导入链去三方依赖并非交互自举 uv Created-by: AvadaKedavrua Commit-by: AvadaKedavrua Merged-by: ascend-robot Description: ## 修改原因 build.py 设计上应在仅有 Python 时即可启动;当前导入链经 _config 拉起 pydantic,且缺 uv 时直接失败,破坏「用户只跑 python build.py / python build.py test、依赖由工具兜底」的契约。关联 #224。 ## 修改内容 - 新增 scripts/helpers/_errors.py,切断 build 对 pydantic 的 import-time 依赖 - 新增 scripts/helpers/build/bootstrap.py:Fail-fast → 缺 uv 则 WARNING 后非交互安装 → uv sync --frozen --group build|ci - uv add --group build 增加 tomli(py<3.11),与 ci 组解耦 - 更新 scripts/README.md 与回归测试(import 隔离 / bootstrap) ## 检视意见跟进 - 去掉内置 PyPI 镜像;默认 pip install --upgrade uv,日志提示用户可自配 PIP_INDEX_URL / UV_INDEX_URL / UV_DEFAULT_INDEX - 安装后 which 失败时回退到解释器 Scripts 目录;bootstrap 将该目录 prepend 到 PATH,供 build.sh / common.sh 使用;run_build 复用返回的 uv_path - 放宽 ConfigError / 补齐 format_expected_got 与 pyproject_toml 公开 API docstring ## 自验证 ### import 隔离(无 pydantic) 目的:验证 scripts.helpers.build.main 导入不依赖 pydantic 步骤: 1. 拦截 pydantic 后导入 build.main 结果: text import_ok True ### 回归测试 目的:build 相关用例全绿 步骤: 1. .venv/bin/python -m pytest tests/regression/scripts/helpers/build/ -q --tb=no 结果: text 72 passed in 1.60s ### argv / help 结果: text usage: build.py [-h] [-v VERSION] [-e KEY=VALUE] [COMMAND ...] BuildOptions(is_test=False, is_local=False, version=None, version_explicit=False, extras={}) See merge request: Ascend/msmodeling!546 | 4 天前 | |
fix(tensor_cast): raise transformers floor for GLM5 Require transformers 5.6.0 or newer because GLM5 DSA tuple return and indexer_types support first appear in that release. Signed-off-by: minghang_c <chiminghang@h-partners.com> Co-authored-by: minghang_c<chiminghang@h-partners.com> # message auto-generated for no-merge-commit merge: !509 merge glm-5-transformers-version-fix into master fix(tensor_cast): raise transformers floor for GLM5 Created-by: minghang_c Commit-by: minghang_c Merged-by: ascend-robot Description: Thanks for your contribution; we appreciate it a lot. The following instructions will make your pull request healthier and help you get feedback more easily. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers. 感谢您的贡献,我们非常重视。以下说明将使您的拉取请求更健康,更易于获得反馈。如果您不理解某些项目,请不要担心,只需提交拉取请求并从维护人员那里寻求帮助即可。 **PR Type / PR类型** - [ ] Feature(功能新增) - [x] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [x] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 GLM5 DSA 在 transformers 5.6.0 起引入了 tuple return / indexer_types 相关源码契约变化: GlmMoeDsaAttention.forward 从二元组返回改为包含 topk slot 的三元组,decoder layer 也开始传递 topk_indices。当前项目的 GLM5 适配已依赖该契约,因此需要将 transformers 最低版本从 5.3.0 提升到 5.6.0,避免较低版本环境安装后出现源码契约不匹配。 ------ ## 📝 Modification / 修改内容 - 将 pyproject.toml 中 transformers 版本约束从 >=5.3.0,<5.8.0 调整为 >=5.6.0,<5.8.0。 - 同步更新 requirements.txt 中的 pip 安装约束。 - 同步更新 uv.lock 中项目 metadata 的 transformers requires-dist 约束。 ------ ## 📐 Associated Test Results / 关联测试结果 - PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --with pytest python -m pytest tests/regression/tensor_cast/test_glm5.py - Result: 3 passed - UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple/ uv lock --check - Result: passed ------ ## 🌟 Use cases (Optional) / 使用案例(可选) N/A. This PR only updates dependency version constraints for GLM5 compatibility. ------ ## ✅ Checklist / 检查列表 **Before PR**: - [x] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests. / 修复的 Bug 已完全由单元测试覆盖,导致 Bug 的情况应在单元测试中添加。 - [x] The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [x] All relevant documentation (API docs, docstrings, example tutorials) has been updated to reflect these changes. / 所有相关文档(API 文档、文档字符串、示例教程)已更新以反映这些更改。 - [x] Please ensure code files contain no Chinese comments. / 请保证代码文件中不含中文注释。 ------ See merge request: Ascend/msmodeling!509 | 15 天前 | |
【FEAT】build.py test 无 test_map 时默认跑全量 pytest Co-authored-by: AvadaKedavrua<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !557 merge test into master 【FEAT】build.py test 无 test_map 时默认跑全量 pytest Created-by: AvadaKedavrua Commit-by: AvadaKedavrua Merged-by: ascend-robot Description: ## 修改原因 本地执行 python3 build.py test 时强制要求 MSMODELING_TEST_MAP_PATH,对日常全量回归不友好;希望未传该变量时默认跑全量 pytest tests(markers 沿用 pyproject.toml),传入后再走 CI Gate。 ## 修改内容 - scripts/helpers/build/:拆分为 main.py(分发)、run_build.py、run_test.py;run_test 按是否解析到 test_map_path 分流——无 map 执行 python -m pytest tests(markers 沿用 pyproject.toml,不覆盖 addopts);有 map 走 CI Gate(先校验 map 文件与 run_ci_gate.sh) - tests/regression/scripts/helpers/build/:覆盖正常/空白 env/全量失败码/CI Gate 路径等 - scripts/README.md、build.py:同步文档与入口说明 - uv.lock:一并纳入 ## 自验证 ### 无 test_map 走全量 pytest(markers 来自 pyproject) 目的:确认未设置 MSMODELING_TEST_MAP_PATH 时启动 pytest tests,并读取 pyproject.toml addopts(deselected 对应 npu/nightly/network) 步骤: 1. 使用仓库 venv Python 启动 test(限时截取启动屏显) bash unset MSMODELING_TEST_MAP_PATH timeout 60 .venv/bin/python build.py test 结果: text Checked 108 packages in 1ms INFO 07-14 14:18:29.753 [main.py:140] running: /root/workspace/gitcode/msmodeling/.venv/bin/python -m pytest tests ============================= test session starts ============================== platform linux -- Python 3.12.13, pytest-9.0.3, pluggy-1.6.0 rootdir: /root/workspace/gitcode/msmodeling configfile: pyproject.toml plugins: xdist-3.8.0, cov-7.1.0, anyio-4.13.0 collected 5055 items / 136 deselected / 4919 selected ### build helper 回归单测 目的:守护全量/CI Gate 双路径及边缘场景 步骤: 1. 运行 build.main 回归 bash uv run --group ci pytest tests/regression/scripts/helpers/build/test_main.py -q --tb=line 结果: text .......................................... [100%] 42 passed in 1.22s ### CI Gate 路径:map 文件缺失 fail-fast 目的:传入不存在的 test_map 时在 bootstrap 前失败 步骤: 1. 指定缺失 map bash unset MSMODELING_TEST_MAP_PATH python3 build.py test -e test_map_path=/tmp/does-not-exist-map.json 结果: text ERROR 07-14 14:16:31.039 [main.py:300] test_map_path is not a file: /tmp/does-not-exist-map.json ### test_map 解析:unset / blank / set / extra 目的:空白环境变量视为未设置,优先 -e test_map_path 步骤: 1. 解析函数冒烟 bash python3 - <<'PY' import os from scripts.helpers.build.argv import BuildOptions from scripts.helpers.build.main import _resolve_test_map_path os.environ.pop("MSMODELING_TEST_MAP_PATH", None) opts = BuildOptions(is_test=True, is_local=False, version=None, version_explicit=False, extras={}) print("unset ->", repr(_resolve_test_map_path(opts))) os.environ["MSMODELING_TEST_MAP_PATH"] = " " print("blank ->", repr(_resolve_test_map_path(opts))) os.environ["MSMODELING_TEST_MAP_PATH"] = "/tmp/map.json" print("set ->", repr(_resolve_test_map_path(opts))) print("extra ->", repr(_resolve_test_map_path(BuildOptions(is_test=True, is_local=False, version=None, version_explicit=False, extras={"test_map_path": "/data/x.json"})))) PY 结果: text unset -> None blank -> None set -> '/tmp/map.json' extra -> '/data/x.json'   See merge request: Ascend/msmodeling!557 | 2 天前 |
MindStudio Modeling
✨ 最新消息
持续支持 DeepSeek、Kimi、Qwen、GLM、MiniMax 等国内主流大模型,点击系列名称展开查看新增支持记录。
DeepSeek 系列
🔹 [2026.06.04] msModeling 新增 DeepSeek-V4 模型支持
🔹 [2026.04.20] msModeling 新增 DeepSeek V3.2 模型支持
🔹 [2025.09.06] msModeling 新增 DeepSeek V3 模型支持
Kimi 系列
🔹 [2026.06.11] msModeling 新增 Kimi-K2.6 模型支持
🔹 [2026.05.27] msModeling 新增 Kimi-K2.5 模型支持
🔹 [2025.09.06] msModeling 新增 Kimi-K2 模型支持
Qwen 系列
🔹 [2026.07.14] msModeling 新增 Qwen3.6 图片输入支持
🔹 [2026.07.14] msModeling 新增 Qwen3.6 Dense / MoE 文本输入支持
🔹 [2026.04.20] msModeling 新增 Qwen3.5 图片输入支持
🔹 [2026.03.31] msModeling 新增 Qwen3.5 Dense / MoE 文本输入支持
🔹 [2025.12.25] msModeling 新增 Qwen3 MoE 模型支持
🔹 [2025.09.18] msModeling 新增 Qwen3-Next 模型支持
🔹 [2025.08.18] msModeling 新增 Qwen3 Dense 模型支持
GLM 系列
🔹 [2026.07.07] msModeling 新增 GLM5.2 模型支持
🔹 [2026.06.04] msModeling 新增 GLM5.1 模型支持
🔹 [2026.04.30] msModeling 新增 GLM5 模型支持
🔹 [2026.03.31] msModeling 新增 GLM-4 MoE 模型支持
MiniMax 系列
🔹 [2026.06.25] msModeling 新增 MiniMax M2.7 模型支持
🔹 [2026.05.29] msModeling 新增 MiniMax M2.5 模型支持
点击模块名称展开查看已支持特性。
模型推理性能仿真
🔹 多硬件仿真(Atlas 800 A2/A3、Atlas 350 等昇腾设备),支持自定义设备画像
🔹 LLM Prefill / Decode 分阶段仿真
🔹 Prefix Cache 仿真
🔹 MTP 投机解码仿真
🔹 编译与图优化、多流通算掩盖
🔹 量化仿真(W8A8 / W4A8 / FP8 / MXFP4 等)
🔹 并行与 MoE 扩展(TP / DP / EP,及 Embedding TP、Vision TP 等细粒度并行)
🔹 性能模型切换(Roofline / Profiling)
🔹 Chrome Trace / Debug
🔹 视频生成 DiT 仿真(Ulysses、CFG、DiT Cache)
服务化性能仿真
🔹 LLM / VLM 约束下吞吐优化(TTFT / TPOT / 服务成本)
🔹 PD 模式(混部 / 分离 / 配比)
🔹 并行策略搜索(TP / EP / MOE-DP)
🔹 MTP 配置搜索
🔹 Chunked Prefill 仿真
🔹 Prefix Cache 仿真
🔹 变长负载仿真
🔹 多流通算掩盖
🔹 跨硬件对比
Web UI
🔹 LLM / VL 前向仿真与视频生成仿真
🔹 吞吐寻优实验(PD 混部 / 分离 / 配比)
🔹 命令预览与任务缓存
🔹 结果展示与导出(曲线、表格、显存/算子明细、Excel)
服务化实测寻优
🔹 服务框架实测寻优(PSO + Early Rejection)
🔹 多引擎支持(vLLM、MindIE)与评测策略
🔹 自定义寻优配置与断点续跑
ℹ️ 简介
MindStudio Modeling(msModeling)是专为昇腾 AI 处理器打造的神经网络推理性能仿真与分析框架,提供单模型性能仿真、服务级吞吐优化、服务化参数自动寻优与可视化分析能力,帮助开发者在无物理硬件或部署前期预测模型性能、识别瓶颈并优化配置。
⚙️ 功能介绍
msModeling 提供模型推理性能仿真、服务化性能仿真和服务化实测寻优等功能模块,覆盖相应性能仿真与寻优场景。模型与特性覆盖范围请参见《模型支持与特性支持矩阵》。
| 功能名称 | 功能描述 |
|---|---|
| 模型推理性能仿真 | 模型仿真模块,拦截 PyTorch 计算图,在指定设备画像上模拟推理过程,输出算子级性能分解、内存占用、算子 shape 及 Chrome Trace。 |
| 服务化性能仿真 | 吞吐优化仿真模块,在 SLO 约束下自动搜索最优并行策略与 batch 配置,支持 PD 混部、PD 分离、PD 配比三种模式。 |
| 服务化实测寻优 | 服务化实测寻优,基于 PSO 粒子寻优算法在 vLLM、MindIE 等真实服务框架上自动搜索满足时延约束的最优部署参数。 |
🚀 快速入门
以模型推理性能仿真与服务化性能仿真为例,快速跑通核心流程,请参见《模型推理性能仿真与服务化性能仿真快速入门》;也可通过《Web UI 使用指南》进行可视化交互配置与结果查看。
📦 安装指南
介绍工具的环境依赖与安装方法,请参见《msModeling 安装指南》。
📘 使用指南
各工具的详细使用说明请参阅其源码仓库中的 README 文件,也可通过上方功能介绍表格中的链接直接跳转。
💡 典型案例
通过典型问题场景帮助用户理解并掌握工具使用,请参见《模型推理性能仿真》与《服务化性能仿真》中的示例。
❓ FAQ
常见问题及解决方案,请提交 Issues 或参见各模块使用指南。
🌌 智能检索
为提升文档查阅效率,我们提供多种高效检索方式:
🔹 AI 问答(DeepWiki):自然语言问答,快速把握项目架构与模块关系。
🔹 AI 问答(ZRead):中文问答体验更优,精准定位功能用法与细节。
🔹 精确搜索(ReadTheDocs):关键词全文检索,直达接口、参数与报错等信息。
🛠️ 贡献指南
欢迎参与项目贡献!详细的贡献流程、代码规范、Commit 规范、测试要求等,请参见《CONTRIBUTING.md》。如有疑问,请提交 Issues。
⚖️ 相关说明
🔹 《版本说明》
🔹 《许可证声明》
🔹 《安全声明》
🔹 免责声明:本工具仿真与优化结果仅供性能评估参考,最终性能表现请以真实环境实测为准
🤝 建议与交流
欢迎大家为社区做贡献。如果有任何疑问或建议,请提交 Issues,我们会尽快回复。感谢您的支持。
SIG 例会:MindStudio Modeling Weekly Meeting 每周三 10:00-12:00(UTC+8)举行,会议纪要与议题请参见 sig-msit-modeling,也可使用 时区转换 查看本地时间。
| 即时互动(微信群) | 官方资讯(公众号) | 深度支持(助手/论坛) |
|---|---|---|
![]() 扫码加入技术交流群 |
![]() 扫码关注官方公众号 |
扫码入群并关注公众号,直达 MindStudio 用户与开发者最快捷的交流平台: 快速提问: 与社区小伙伴即时探讨技术问题 掌握动态: 第一时间获取版本发布与功能更新通知 经验共享: 与广大开发者交流最佳实践与实战心得 更多支持渠道:👉 昇腾助手: |
🙏 致谢
本工具由以下公司/部门联合贡献,以下排名不分先后:
🔹 华为
昇腾计算产品部
湛卢、AI Workload
2012 网络技术实验室、2012 马尔科夫实验室
小巧灵突击队、OTT 系统部
🔹 蚂蚁集团
🔹 电信研究院
感谢来自社区的每一个 PR,欢迎贡献!

