| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
【FIX】【TEST】修复 README/文档失效链接并默认运行完整 benchmark 套件 Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !331 merge fix into develop 【FIX】【TEST】修复 README/文档失效链接并默认运行完整 benchmark 套件 Created-by: AvadaKedavrua Commit-by: liujiawang Merged-by: ascend-robot Description: ## 修改原因 1. README.md 社区区公众号二维码指向 msinsight 仓库旧路径,资源已 404,用户扫码/预览失败。 2. OP_PLUGIN_MAPPING_TUTORIAL.md 中 Op Mapping skill 相对路径错误,文档内链接跳转失败。 3. benchmark 入口默认只跑 tests/benchmark/ops/,tests/benchmark/models/ 模型回归被静默跳过,CI/nightly 覆盖不足。 4. 全量 benchmark 启用后,qwen3-30b-a3b decode/prefill baseline 与当前 compile 输出不一致,需刷新。 --- ## 修改内容 | 类别 | 文件 | 变更 | |------|------|------| | 文档链接 | README.md | 公众号图片 URL 换为可用 user-images 资源;TOC 补全 Contributions / Community 等章节锚点 | | 文档链接 | docs/perf_database/tutorial/OP_PLUGIN_MAPPING_TUTORIAL.md | skill 路径 ../skills/... → ../../../.agents/skills/op-mapping/SKILL.md | | benchmark 默认行为 | scripts/run_benchmark.sh、scripts/helpers/nightly/main.py | 移除 MSMODELING_BENCHMARK_MODELS 开关,固定跑 tests/benchmark/ 全目录 | | 设计文档 | docs/design/ut_refactor.md | 同步 benchmark phase 描述 | | baseline | tests/benchmark/models/cases/qwen3-30b-a3b-{decode,prefill}.json | 刷新 baseline_time_s 与 operator top-N | | lint | experimental/optix/、scripts/、tensor_cast/、tests/ 等 | 为 inspect.* 误报补 pylint: disable 注释 | --- ## 自验证 ### README 公众号图片链接 目的:确认旧链接 404、新链接可访问。 步骤: 1. 检查旧 URL HTTP 状态 2. 检查新 URL HTTP 状态 bash curl -sI "https://raw.gitcode.com/Ascend/msinsight/raw/master/docs/zh/user_guide/figures/readme/officialAccount.jpg" | head -1 curl -sI "https://raw.gitcode.com/user-images/assets/8428112/2a22a707-de26-4bb3-b312-4952035e021b/30be980e7fd65b2486d251b48a7999f3.jpg" | head -1 结果: text HTTP/1.1 404 Not Found HTTP/1.1 200 OK ### Op Mapping skill 文档路径 目的:确认教程内链接指向真实文件。 步骤: 1. 在仓库根目录检查 skill 文件是否存在 bash test -f .agents/skills/op-mapping/SKILL.md && echo OK 结果: text OK ### Benchmark 入口默认全量 目的:确认 run_benchmark.sh 不再依赖 MSMODELING_BENCHMARK_MODELS,默认覆盖 models 子目录。 步骤: 1. 查看脚本 benchmark target 配置 bash grep -n "TESTS_BENCHMARK" scripts/run_benchmark.sh 结果: text run_pytest "${TESTS_BENCHMARK}/" \ ### CI 流水线 目的:确认改动未破坏现有 CI/docs CI。 步骤: 1. 查看 PR #331 CI label 状态 结果:PR 已打标 ci-pipeline-passed、docs-ci-pipeline-success。 See merge request: Ascend/msmodeling!331 | 17 天前 | |
【REFACTOR】CI Gate 联合执行与 Nightly 流水线加固 Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !342 merge fix into develop 【REFACTOR】CI Gate 联合执行与 Nightly 流水线加固 Created-by: AvadaKedavrua Commit-by: liujiawang Merged-by: ascend-robot Description: ## 修改原因 CI Gate / Nightly helpers 在 union 重构后存在多处逻辑与体验问题: - 全豁免测试仍跑 Phase 2(#112) - Nightly audit 使用过期 test_map(#113) - coverage fallback 在 union 重构后断裂(#119) - PRODUCT_SOURCE_PREFIXES 与 gate_policy.yaml 双源 roots - 重复 collect/git diff、日志含内部术语、nightly 缺终端摘要 本 PR 统一执行模型并补齐回归测试与文档。 --- ## 修改内容 **CI Gate (scripts/helpers/ci_gate/)** - 预跑硬阻断仅保留删除测试/删除源码;覆盖率映射改为跑后软策略 - compute_execution_plan 联合去重 pytest waves;产品/测试变更时附加 --cov - fetch_diff() 单次 git diff;load_gate_policy 按 yaml mtime 缓存 - roots 单一来源:tests/.ci/gate_policy.yaml - 用户向英文日志与成功摘要 print **Nightly (scripts/helpers/nightly/)** - 过期/冗余审计使用新鲜 test_map(#113) - 终端摘要、英文 phase 标签;移除 drift TODO - allowed_node_ids 复用、弱覆盖符号检测传 mapping **Common / Policy** - coverage_config.py 懒加载 product_roots() - gate_policy.yaml:tests/helpers/** exclude - 文档同步:tests/README.md、docs/design/ut_refactor.md、tests/SKILL.md 关联 issue:#112 #113 #114 #115 #116 #117 #119 #120 #121 #122 #123 #124 --- ## 优化特性对比(Before / After) ### 特性 1:联合去重 pytest 执行(核心优化) **场景**:同一 PR 同时改了产品代码 tensor_cast/foo.py 和测试文件 tests/regression/cli/test_shared.py,且 test_shared.py::test_x 恰好也是 foo.py 在 test_map 里的回归用例。 #### Before(分阶段、可能重复跑) text # 1) 预跑:新源码无 test_map 映射 → 直接硬阻断,pytest 还没跑 BLOCK: tensor_cast/foo.py has no test_map entry for symbol Foo.bar # 2) Phase 0:单独跑一轮带 --cov 的 pytest 做 coverage fallback pytest tests/regression/cli/test_shared.py -m not npu --cov ... # 3) Phase 1:跑变更测试 pytest tests/regression/cli/test_shared.py::test_x -m not npu # 4) Phase 2:再跑映射回归(与 Phase 1 重叠) pytest tests/regression/cli/test_shared.py::test_x \ tests/regression/cli/test_other.py::test_y \ -m "not npu and not nightly and not network" → test_shared.py::test_x 被执行 2~3 次;git diff 可能重复 fetch;coverage 与映射校验割裂 #### After(先跑、后验、去重) text # 1) 预跑硬阻断:仅删测试 / 删源码 Validating hard-blocking policy ... (no block — foo.py 是修改不是删除) # 2) 计划:联合调度,node id 去重(changed-test 优先) Scheduling 2 test node(s): new or changed test file Scheduling 1 test node(s): changed product file mapped regression Sample node(s): tests/regression/cli/test_shared.py::test_x, ... Execution uses 2 pytest wave(s) after deduplication # 3) 单次 union pytest(附带 --cov --cov-context=test) Wave 1 (-m not npu): tests/regression/cli/test_shared.py::test_x # changed-test,只跑一次 Wave 2 (-m not npu and not nightly and not network): tests/regression/cli/test_other.py::test_y # 纯回归,test_x 不再重复 # 4) 跑后软策略:用同一次 .coverage 做 mapping fallback Checking new/modified source coverage mapping against collected data ... CI gate passed: 2 test node(s) (new or changed test file; changed product file mapped regression) → 同一 node 只执行 1 次;coverage fallback 与 pytest 同轮完成;CI 耗时更短、行为更可预期 ### 特性 2:配置变更触发全量,跳过无效 collect **场景**:PR 只改了 pyproject.toml(依赖/测试配置变更)。 #### Before text config change detected → full suite still collect changed test files in Phase 1 ... # 多余 collect pytest tests/ -m not npu #### After text Config path(s): pyproject.toml Selected full test suite: dependency or test configuration changed pytest tests/ -m not npu # changed_test_nodes 为空,跳过 gate_new_tests collect CI gate passed: full test suite (pyproject.toml) ### 特性 3:Nightly 终端摘要(用户可读) #### Before text Phase 2a done. elapsed=1832.4s # 流水线结束,无一行总览;内部 phase 编号 #### After text Nightly pipeline finished. test_map: written (line 74.1%, branch 61.8%) nightly-marked: 142 passed in 1832s benchmark: 38 passed in 412s network: 12 passed in 89s weak coverage symbols: 3 report: /path/to/nightly_report.json --- ## 自验证 ### Helpers 回归测试 目的:确认 CI Gate / Nightly / Common helpers 全量回归通过 步骤: 1. 进入仓库根目录 2. 执行: bash uv run python -m pytest tests/regression/scripts/helpers/ -q 结果: 341 passed, 5 warnings in 1.02s ### gate_policy 缓存失效 目的:确认 yaml mtime 变化后 load_gate_policy 缓存失效 步骤: 1. 运行单测: bash uv run python -m pytest tests/regression/scripts/helpers/ci_gate/test_gate_policy.py::test_load_gate_policy_cached_until_yaml_mtime_changes -v 结果:PASSED(修复同秒写入 mtime 未变导致的 flaky) ### pre-commit 目的:提交前 hook 全绿 步骤: 1. git commit 触发 pre-commit(ruff、pylint、bandit、typos 等) 结果:全部 Passed See merge request: Ascend/msmodeling!342 | 15 天前 | |
feat(tensor_cast): Organize serving_cast.main output structure Co-authored-by: Elrond G<elrondgcn@gmail.com> # message auto-generated for no-merge-commit merge: !226 merge feature/develop/serving_cast_output_file into develop feat(tensor_cast): Organize serving_cast.main output structure Created-by: elrond-g Commit-by: Elrond G 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.** **请描述您的拉取请求的动机和您希望通过此拉取请求实现的目标。** Used for structured interaction between cli tools and other services ------ ## 📝 Modification / 修改内容 **Please briefly describe what modification is made in this PR.** **请简要描述此拉取请求中进行的修改。** Add a parameter "--output-json" to the running result of the cli tool tensor_cast.scripts.text_generate, and save it to the specified file. ------ ## 📐 Associated Test Results / 关联测试结果 **Please provide the related test results, such as test reports, etc.** **请提供相关测试结果,例如测试报告等。** bash python -m serving_cast.main --instance_config_path serving_cast/example/instances.yaml --common_config_path serving_cast/example/common.yaml --output_json output_json.json ------ ## 🌟 Use cases (Optional) / 使用案例(可选) **If this PR introduces a new feature, it is better to list some use cases here and update the documentation.** **如果此拉取请求引入了新功能,最好在此处列出一些用例并更新文档。** args: --output_json", type: string (file_name) default: None, desc: If set, write the benchmark summary (per-metric table and overall summary) as a structured JSON to this file path. ------ ## ✅ 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!226 | 17 天前 | |
refactor(tensor_cast): unify word embedding tp config Co-authored-by: Kudo__shinichi<liuning119@huawei.com> # message auto-generated for no-merge-commit merge: !344 merge codex/word-embedding-tp-normalize into develop refactor(tensor_cast): unify word embedding tp config Created-by: Kudo__shinichi Commit-by: Kudo__shinichi 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(持续集成/持续部署) - [x] Refactor(代码重构) - [ ] Perf(性能优化) - [x] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 word_embedding_tp and word_embedding_tp_mode represented the same configuration concept in two fields: one field toggled word embedding TP, and the other selected the TP mode. This PR reduces the public and internal configuration shape to a single parameter so users only need to configure word_embedding_tp as disabled, col, or row. ------ ## 📝 Modification / 修改内容 - Make UserInputConfig.word_embedding_tp the single nullable word embedding TP mode field. - Remove word_embedding_tp_mode and embedding_parallel_mode from the config model. - Pass the normalized word_embedding_tp mode directly into ParallelConfig.embedding_parallel and the embedding transformation. - Keep legacy bool input normalization for compatibility: True -> col, False/None -> disabled. - Remove redundant CLI-side bool/mode conversion and update related benchmark cases and user guide docs. - Add regression coverage for single-field config, legacy bool normalization, and invalid word_embedding_tp values. ------ ## 📐 Associated Test Results / 关联测试结果 - python -m pytest tests/regression/tensor_cast/test_user_config.py -q: 6 passed - python -m pytest tests/regression/tensor_cast/test_user_config.py tests/regression/web_ui/test_command_builder.py tests/regression/tensor_cast/test_adapter_automation.py -q: 98 passed - python -m pytest tests/regression/tensor_cast/test_text_generate.py -k word_embedding_parallel -q: 2 passed, 113 deselected - python -m pytest tests/regression/tensor_cast/test_sequence_parallel_pass.py -o addopts= -m "nightly and not npu and not network" -q: 2 passed - python -m pytest tests/benchmark/models/test_model_regression.py --collect-only -q: 15 tests collected - python -m ruff check <changed python files>: All checks passed - python -m pre_commit run --from-ref origin/develop --to-ref HEAD: passed - git diff --check HEAD~1 HEAD: passed ------ ## 🌟 Use cases (Optional) / 使用案例(可选) - Disable word embedding TP: word_embedding_tp=None - Enable column mode: word_embedding_tp="col" - Enable row mode: word_embedding_tp="row" - CLI usage: --word-embedding-tp col or --word-embedding-tp row ------ ## ✅ 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!344 | 15 天前 | |
绑定web_ui运行地址 Co-authored-by: zwt<zhuweite@huawei.com> # message auto-generated for no-merge-commit merge: !335 merge develop into develop 绑定web_ui运行地址 Created-by: zwt__ Commit-by: zwt Merged-by: ascend-robot Description: # PR Template **PR Type / PR类型** - [ ] Feature(功能新增) - [x] Bugfix(Bug 修复) - [ ] Docs(文档更新) - [ ] CI/CD(持续集成/持续部署) - [ ] Refactor(代码重构) - [ ] Perf(性能优化) - [x] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 1. **绑定 Web UI 运行地址**到 127.0.0.1,确保服务仅在本地运行,避免潜在的安全风险 2. **修复 Gradio 不兼容性问题**,移除 show_copy_button=True 配置(该参数在当前 Gradio 版本中不支持) ------ ## 📝 Modification / 修改内容 ### 代码修改 1. **web_ui/web_ui_start.py** - 移除 --host 参数支持,固定使用 127.0.0.1 作为服务器地址 - 移除 --host 命令行参数 - 添加注释说明 host 固定为 127.0.0.1 2. **web_ui/components.py** - 移除 show_copy_button=True 配置 - 修复 Gradio 不兼容性问题(该参数在当前 Gradio 版本中不支持) 3. **tests/regression/web_ui/test_web_ui_start.py** - 更新测试用例以匹配新的行为 - test_main_custom_args: 移除 --host 参数 - test_main_with_env_vars: 更新期望的 server_name 为 "127.0.0.1",并更新文档说明 GRADIO_SERVER_NAME 环境变量被忽略 ------ ## 📐 Associated Test Results / 关联测试结果   ------ ## ✅ 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. / 此拉取请求中的修改已完全由单元测试覆盖。如果不是,请添加更多单元测试以确保正确性。 - [ ] 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!335 | 16 天前 | |
【REFACTOR】【TESTS】重构 tests 目录并补充 smoke 测试 Co-authored-by: liujiawang<anonymousdev@163.com> # message auto-generated for no-merge-commit merge: !266 merge refactor-tests into develop 【REFACTOR】【TESTS】重构 tests 目录并补充 smoke 测试 Created-by: AvadaKedavrua Commit-by: liujiawang;AvadaKedavrua 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(功能新增) - [x] Bugfix(Bug 修复) - [x] Docs(文档更新) - [x] CI/CD(持续集成/持续部署) - [x] Refactor(代码重构) - [x] Perf(性能优化) - [x] Test-Cases(测试用例更新) - [ ] Other(其他) ## 🔍 Motivation / 变更动机 现有 UT 目录混合了 smoke、regression、benchmark、模型配置资产和脚本测试,导致本地执行入口不统一、CI 无法稳定做增量选择,nightly 也缺少统一的 test_map 刷新和报告链路。旧的 tests/run_ut.sh 入口难以表达“快速 smoke / 完整 regression / benchmark / PR gate / nightly”这些不同场景,新增或删除源码时也缺少基于 test_map 的覆盖检查。 本 PR 目标是把测试体系拆成清晰分层,并补齐 CI gate、nightly、coverage gate、test_map 构建和文档,让开发者和流水线都能按同一套目录与脚本执行测试。同时修复整理过程中暴露出的少量模型配置、serving 输出文本和文档问题。 ------ ## 📝 Modification / 修改内容 本次按 hunk/主题重新整理为 17 个提交,主要修改如下: - 重构测试目录:将旧 tests/test_tensor_cast、serving_cast/tests、web_ui/tests、tests/tools、tests/perf_database、tests/st 拆分到 tests/smoke/、tests/regression/、tests/benchmark/。 - 统一测试资产:将模型配置移动到 tests/assets/model_config/,同步更新 pre-commit exclude、缓存目录和文档说明。 - 新增共享测试 helper:补充断言、配置工厂、fake subprocess、模型构造、op registry 等公共测试工具,减少测试重复代码。 - 新增 CI gate helper:增加 diff 分类、test_map 读取、AST 符号映射、coverage gate、增量测试选择和 gate policy 配置。 - 新增 nightly helper:增加 pytest 结果解析、报告模型、报告构建、Feishu webhook 通知、test_map 刷新和 benchmark 调度入口。 - 新增统一脚本入口:新增 scripts/run_smoke.sh、scripts/run_regression.sh、scripts/run_benchmark.sh、scripts/run_ci_gate.sh、scripts/run_nightly.sh,替换旧 tests/run_ut.sh。 - 更新配置与文档:补充 pyproject.toml 的 pytest marker/testpaths/filterwarnings,更新 README.md、tests/README.md、docs/en/web_ui.md、web_ui/README.md、tools/perf_data_collection/README.md。 - 修复模型/输出细节:为 DeepseekV32DecoderLayer 注册 config_class;规范 serving_cast optimizer summary 的冒号和 runner 日志文案。 ### 后续 UT 怎么上 - 新增快速兜底用例放到 tests/smoke/:覆盖导入、基础 compile path、轻量 config resolver、轻量 serving/tensor_cast 主路径,要求无 NPU、无大模型权重、反馈快,适合每个 PR 先跑。 - 新增功能回归用例放到 tests/regression/<domain>/:按 tensor_cast、serving_cast、cli、web_ui、scripts/helpers 等领域归档,覆盖具体 bugfix、边界条件、行为契约和工具脚本逻辑。 - 新增长耗时或性能相关用例放到 tests/benchmark/:模型基准、perf_database、trace/CSV 性能数据处理等不阻塞普通 PR gate 的测试归到 benchmark 层。 - 新增模型配置、fixture、样例数据优先放到 tests/assets/ 或就近 fixtures/,避免继续散落在测试包内部;大文件或生成缓存走 .msmodeling_cache/、tests/assets/cache/,不直接进入源码目录。 - 新测试默认使用 tests/helpers/ 的公共构造器和断言工具;需要 fake subprocess、模型配置、op registry 时复用已有 helper,减少每个测试重复 mock 和手写配置。 - 需要 NPU 的用例必须打 @pytest.mark.npu;只应 nightly 跑的大模型/长耗时 compile 用例打 @pytest.mark.nightly,避免进入默认本地和 PR 快速路径。 ### 怎么根据语义上 UT - 测试不再只按文件名机械归类,而是按“被测语义”挂到对应源码符号:产品源码的函数、类、方法、顶层行为需要在 test_map 中映射到验证它的测试 nodeid。 - 新增产品源码时,如果是可执行逻辑,应新增对应 smoke 或 regression 用例,并让 test_map 能找到该源码/符号;确实不需要测试的符号需要在 exemption 中写明原因。 - 修改已有源码时,CI gate 会用 AST 定位变更行落在哪个 top-level definition 或 class/method span,再通过 test_map 选择关联测试;如果符号没有映射,会阻断或扩大测试范围,避免“改了逻辑但没跑语义相关 UT”。 - 删除源码时,CI gate 会检查 test_map 中是否仍有引用该源码的测试,防止遗留无效映射;删除测试时也会检查是否破坏已有源码覆盖关系。 - 跨层依赖变更会按语义优先选择所属 regression layer,无法明确归属或配置变更时升级为更完整的套件,保证增量选择不会漏测。 - test_map 由 nightly 在完整测试通过后刷新,PR gate 消费稳定版本;这样避免每个 PR 临时生成不可信映射,同时让语义映射随主干测试演进。 ### 流水线做了什么调整 - 本地与 CI 统一入口:run_smoke.sh 跑快速 smoke,run_regression.sh 跑完整 regression,run_benchmark.sh 跑 benchmark,run_ci_gate.sh 跑 PR 增量门禁,run_nightly.sh 跑夜间全流程。 - PR gate 从“固定跑一批 UT”改为“diff -> classify changes -> load test_map -> apply gate rules -> run selected pytest -> coverage gate”。配置变更、源码新增/删除、测试新增/删除、源码修改会走不同 gate 规则。 - coverage gate 统一读取 MSMODELING_TEST_LINE_THRESHOLD 和 MSMODELING_TEST_BRANCH_THRESHOLD,默认 line 70、branch 50;pytest 默认排除 npu,PR gate 额外排除 nightly。 - nightly 分两阶段:先跑非 NPU、非 nightly 的 smoke/regression 并在通过后刷新 test_map;再跑 nightly 标记用例与 benchmark,并构建结构化报告。 - 流水线统一支持 MSMODELING_OFFLINE、MSMODELING_TEST_WEIGHTS_PRUNE、MSMODELING_TEST_MAP_PATH 等环境变量,减少不同脚本各自处理缓存、离线和权重清理的差异。 - benchmark 不纳入普通 coverage gate,避免性能/长耗时用例拖慢 PR 门禁;必要时可通过独立 benchmark pipeline 或 nightly 验证。 - pre-commit exclude 同步到新目录,模型配置资产和 fixtures 不再被无意义格式化或误报。 已处理问题清单: - 旧 UT 入口单一,无法区分 smoke、regression、benchmark、nightly 和 PR gate。 - 模型配置资产散落在测试用例目录下,pre-commit 与测试引用路径容易漂移。 - 新增/删除源码缺少 test_map 覆盖检查,CI 不能精准阻断未补测试的变更。 - coverage 阈值、pytest marker、离线模式、权重缓存清理等 CI 参数缺少统一入口。 - nightly 缺少结构化报告、失败摘要和 Feishu 通知链路。 - web UI 测试仍在模块内,未纳入统一 regression 层级。 - DeepseekV32DecoderLayer 缺少 config_class,影响配置类识别一致性。 - serving_cast 部分日志/summary 文案有多余空格或表达不统一。 ------ ## 📐 Associated Test Results / 关联测试结果 提交过程中每个 commit 均触发 pre-commit hook,已通过已检查文件的 trailing whitespace、EOF、YAML/JSON、大文件、merge conflict、private key、ruff、ruff-format、codespell、pylint、bandit、typos 等检查。 本地未额外执行完整 smoke/regression/benchmark 全量测试;推送后以 GitCode CI 结果为准。建议重点关注: - bash ./scripts/run_smoke.sh - bash ./scripts/run_regression.sh - bash ./scripts/run_ci_gate.sh(需设置 MSMODELING_TEST_MAP_PATH) - bash ./scripts/run_nightly.sh(需设置 MSMODELING_TEST_MAP_PATH) ------ ## 🌟 Use cases (Optional) / 使用案例(可选) - 本地快速验证:开发者运行 bash ./scripts/run_smoke.sh 获取快速反馈。 - 本地完整回归:开发者运行 bash ./scripts/run_regression.sh 覆盖主要回归用例。 - PR 增量门禁:CI 设置 MSMODELING_TEST_MAP_PATH 后运行 bash ./scripts/run_ci_gate.sh,按 diff 与 test_map 选择用例并执行 coverage gate。 - 夜间任务:nightly 先跑非 nightly 的 smoke/regression 并刷新 test_map,再执行 nightly/benchmark 并生成报告,可选 Feishu 通知。 ------ ## ✅ 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 的情况应在单元测试中添加。 - [ ] 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!266 | 26 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 17 天前 | ||
| 15 天前 | ||
| 17 天前 | ||
| 15 天前 | ||
| 16 天前 | ||
| 26 天前 |