文件最后提交记录最后更新时间
【msmodelslim】刷新文件头部声明和版权 Co-authored-by: caishengcheng<caishengcheng@huawei.com> # message auto-generated for no-merge-commit merge: !28 merge license into master 【msmodelslim】刷新文件头部声明和版权 Created-by: caishengcheng Commit-by: caishengcheng Merged-by: ascend-robot Description: 【msmodelslim】刷新文件头部声明和版权 See merge request: Ascend/msmodelslim!284 个月前
【msmodelslim】【UT】补充format存量代码UT,行覆盖率大于90 Co-authored-by: anreywmh<18845895998@163.com> # message auto-generated for no-merge-commit merge: !514 merge w_ut_1 into master 【msmodelslim】【UT】补充format存量代码UT,行覆盖率大于90 Created-by: anreywmh Commit-by: anreywmh Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 补充format下UT测试用例 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 ![image.png](https://raw.gitcode.com/user-images/assets/8444818/bbc2f287-2a5b-4506-9e86-3db008f80b9d/image.png 'image.png') - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!51415 分钟前
【docs】:大模型检查低错修改 Co-authored-by: zzm30<zhengzhimin1@h-partners.com> # message auto-generated for no-merge-commit merge: !333 merge master into master 【docs】:大模型检查低错修改 Created-by: zzm30 Commit-by: zzm30 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!3331 个月前
【feature】【UT】增加adapt rotation UT Co-authored-by: xyxin_006<xyxin_hit@163.com> # message auto-generated for no-merge-commit merge: !186 merge feature/adapt_rotation_new into master 【feature】【UT】增加adapt rotation UT Created-by: xyxin_006 Commit-by: xyxin_006 Merged-by: ascend-robot Description: 增加adapt rotation UT See merge request: Ascend/msmodelslim!1862 个月前
【test】 补全 cli/app/flat_quant 三模块单测,达 80% 行覆盖门禁 Co-authored-by: rookie_hongchuan<hongchuan6@h-partners.com> # message auto-generated for no-merge-commit merge: !471 merge feature/ut-coverage into master 【test】 补全 cli/app/flat_quant 三模块单测,达 80% 行覆盖门禁 Created-by: rookie_hongchuan Commit-by: rookie_hongchuan Merged-by: ascend-robot Description: ## PR描述 (What this PR does / why we need it?) 补全 msmodelslim/cli + app + processor/flat_quant 三模块单测覆盖,达到行覆盖率 80% / 分支覆盖率 60% 门禁。 新增 21 个单测文件,覆盖正常/边界/异常三类情形,模块聚合行覆盖 85% / 分支覆盖 80%(全部达标)。 ## 面向用户的变更 (Does this PR introduce _any_ user-facing change?) 无。仅新增单测,不修改业务源码。 ## 功能验证 (How was this patch tested?) - [x] 功能自验:pytest test/cases/app/ test/cases/cli/ test/cases/processor/flat_quant/ test/smoke/ → 402 passed, 48 skipped, 3 xfailed - [x] 覆盖率:三模块行覆盖 81%-98%,均过 80% 门禁 ### 覆盖明细 | 模块 | 行覆盖 | 分支覆盖 | |------|--------|---------| | msmodelslim/cli/ | 98% | 95% | | msmodelslim/processor/flat_quant/ | 84% | 75% | | msmodelslim/app/ | 81% | 76% | ### 新增单测文件(21 个) - test/cases/cli/test_utils.py, test_cli_main.py, test_naive_main.py, test_analysis_main.py, test_tuning_main.py - test/cases/app/auto_tuning/test_application.py, test_evaluation_service_infra.py, test_model_info_interface.py, test_plan_manager_infra.py, test_practice_accuracy_infra.py, test_practice_history_infra.py, test_practice_manager_infra.py - test/cases/app/naive_quantization/test_application_helpers.py - test/cases/processor/flat_quant/flat_quant_utils/test_fqu_utils.py, test_trans_matrix.py, test_flat_quant_manager.py, test_fake_clip_quantizer.py, test_flat_fake_quant_linear.py, test_structure_pair.py, test_structure_pair_real.py - test/smoke/test_flat_quant.py See merge request: Ascend/msmodelslim!4711 天前
[feature] 量化配置yaml校验 Co-authored-by: tanxiangyuu<tanxiangyu2@huawei.com> # message auto-generated for no-merge-commit merge: !380 merge dev into master [feature] 量化配置yaml校验 Created-by: tanxiangyuu Commit-by: tanxiangyuu Merged-by: ascend-robot Description: ## PR描述 (What this PR does / why we need it?) ### 背景 msmodelslim 的 YAML 量化配置解析链中,Metadata 模型缺少 extra='forbid' 设置,默认 extra='ignore' 导致字段名拼写错误(如 scroe→score、labll→label)、缩进错误(如 include/exclude 误入 metadata 层级)等低级失误被静默丢弃,用户无任何报错提示,量化流程以错误的默认参数继续执行。 此外,PyYAML 对重复键静默用后值覆盖前值,项目缺少相关检测。 ### 变更内容 1. Metadata extra='forbid' - msmodelslim/core/practice/interface.py:Metadata 添加字段验证器(validate_str_length、in_range),修复 verified_model_types 使用 dataclasses.field → pydantic.Field 的问题 - msmodelslim/utils/patch/pydantic.py:patch 后的 PatchedBaseModel 默认 extra='forbid',所有子类自动继承;需要允许额外字段的模型(如 BaseQuantConfig)已显式设置 extra='allow',不受影响 效果:Metadata 层级的拼写错误、缩进错误在配置加载阶段立即报错,不再静默丢弃。 2. YAML 重复键检测 - msmodelslim/utils/security/path.py:新增 _DuplicateKeyLoader(继承 yaml.SafeLoader),在 yaml_safe_load 中检测重复键,发现时抛出 SchemaValidateError 并提示行号 效果:config_id: a / config_id: b 重复键不再静默覆盖,立即报错。 3. Pydantic patch 优化 - msmodelslim/utils/patch/pydantic.py: - 错误信息包含完整路径(如 process.0.type 而非 value) - 一次性报出metadata或spec的所有校验错误,不截断 - __init__ 通过栈帧检测区分嵌套调用和直接调用,嵌套时不破坏 Pydantic 的错误收集 - model_config 默认 extra='forbid',所有新建模型自动拒绝未知字段 4. 校验工具函数 - msmodelslim/utils/validation/value.py:新增 allow_empty_list、allow_empty_dict、at_least_one_key、in_range 等通用校验函数 - msmodelslim/utils/validation/pydantic.py:新增对应的 Pydantic AfterValidator 包装 5. 代码清理 - 移除各 processor 文件中冗余的 model_config = ConfigDict(extra="forbid")(由 patch 默认提供) - 统一代码格式(缩进、引号、行尾空格) - 修复 greater_than_zero 支持 Decimal 类型 - 移除未使用的 is_boolean 校验函数 ### 面向用户的变更 | 场景 | 修复前 | 修复后 | |------|--------|--------| | Metadata 字段拼写错误(scroescore) | 静默丢弃,使用默认值 | 立即报错,提示完整路径 | | include/exclude 缩进到 metadata 下 | 静默丢弃,所有模块被量化 | 立即报错 | | YAML 重复键 | 静默覆盖 | 立即报错,提示行号 | | 任意 Pydantic 模型的未知字段 | 默认忽略 | 默认拒绝(extra='forbid') | | 多个校验错误同时存在 | 只报第一个 | 一次性全部报出 | ### 错误信息示例 #### 示例1 ![image.png](https://raw.gitcode.com/user-images/assets/8444818/d50dbb2a-bbcd-4cc6-95fb-c04d558c4d05/image.png 'image.png') ![image.png](https://raw.gitcode.com/user-images/assets/8444818/5b848056-63ad-423a-bce4-16188d5a587b/image.png 'image.png') #### 示例2 ![image.png](https://raw.gitcode.com/user-images/assets/8444818/8beba509-b986-4468-b018-d3183ad5a85f/image.png 'image.png') ![image.png](https://raw.gitcode.com/user-images/assets/8444818/e31bc2eb-9a21-46fc-b7b4-fd9835436410/image.png 'image.png') #### 示例3 ![image.png](https://raw.gitcode.com/user-images/assets/8444818/e51ea28e-c5ff-4df9-b199-b5ffa6f2d1c1/image.png 'image.png') ![image.png](https://raw.gitcode.com/user-images/assets/8444818/1bd0f623-1a60-4082-85be-36f01627a050/image.png 'image.png') ### 结构修改 | 文件 | 修改说明 | |------|---------| | 文件 | 修改说明 | | :--- | :--- | | msmodelslim/utils/patch/pydantic.py | 新增 _format_validation_error_in_model_validate;默认 extra='forbid'model_validate 合并 _additional_validation_errors | | msmodelslim/utils/validation/validation_state.py | 新增:管理校验上下文(路径前缀)和额外错误存储 | | msmodelslim/processor/base.py | validate_auto_processor_config_list 不再 raise,非 dict 项错误写入 validation_state;设置 spec. 路径前缀 | | msmodelslim/utils/security/path.py | 新增 _DuplicateKeyLoaderyaml_safe_load 使用自定义 Loader;添加 encoding='utf-8' | | msmodelslim/core/practice/interface.py | Metadata 添加验证器;verified_model_types 改用 pydantic.Field | | msmodelslim/utils/validation/value.py | 新增 allow_empty_listallow_empty_dictat_least_one_keyin_range | | msmodelslim/utils/validation/pydantic.py | 新增 _to_value_error 包装,Pydantic 能收集多个自定义验证器的错误 | | msmodelslim/processor/*.py | 移除冗余 model_config;统一代码格式 | See merge request: Ascend/msmodelslim!3802 天前
【UT】补充core目录UT Co-authored-by: joejoezhou<zhourongchen1@huawei.com> # message auto-generated for no-merge-commit merge: !487 merge feature/core-ut into master 【UT】补充core目录UT Created-by: joejoezhou Commit-by: joejoezhou Merged-by: ascend-robot Description: ## PR描述 (What this PR does / why we need it?) 补充msmodelslim/core单测 ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? 无 ## 功能验证 (How was this patch tested?) - [x] 功能自验 - [x] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [x] 新增/变更内容是否已新增/适配UT测试用例看护 See merge request: Ascend/msmodelslim!4871 天前
【msmodelslim】刷新文件头部声明和版权 Co-authored-by: caishengcheng<caishengcheng@huawei.com> # message auto-generated for no-merge-commit merge: !28 merge license into master 【msmodelslim】刷新文件头部声明和版权 Created-by: caishengcheng Commit-by: caishengcheng Merged-by: ascend-robot Description: 【msmodelslim】刷新文件头部声明和版权 See merge request: Ascend/msmodelslim!284 个月前
【msmodelslim】刷新文件头部声明和版权 Co-authored-by: caishengcheng<caishengcheng@huawei.com> # message auto-generated for no-merge-commit merge: !28 merge license into master 【msmodelslim】刷新文件头部声明和版权 Created-by: caishengcheng Commit-by: caishengcheng Merged-by: ascend-robot Description: 【msmodelslim】刷新文件头部声明和版权 See merge request: Ascend/msmodelslim!284 个月前
【msmodelslim】刷新文件头部声明和版权 Co-authored-by: caishengcheng<caishengcheng@huawei.com> # message auto-generated for no-merge-commit merge: !28 merge license into master 【msmodelslim】刷新文件头部声明和版权 Created-by: caishengcheng Commit-by: caishengcheng Merged-by: ascend-robot Description: 【msmodelslim】刷新文件头部声明和版权 See merge request: Ascend/msmodelslim!284 个月前
增加开发者测试指南 Co-authored-by: 李明宇<limingyu35@h-partners.com> # message auto-generated for no-merge-commit merge: !416 merge master-utdocs into master 【feature】【DOCS】增加开发者测试指南 Created-by: code_mingming Commit-by: code_mingming;李明宇 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) 1.提交测试用例规范指南,用户可按资料执行UT用例测试。 2.修改run_ut.sh 可以参数控制只进行modelslim_vl的相关用例测试。 3.修复部分ut,增加之前未开启的ir目录。 ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!41615 天前