已合并
【bugfix】ascendv1_save_module_preprocess 允许保存新prefix #106
【bugfix】ascendv1_save_module_preprocess 允许保存新prefix #106
已合并
zhangz200102创建于 2月3日
zhangz200102成员
2月3日

当前模型适配器继承AscendV1SaveInterface后,通过实现ascendv1_save_module_preprocess方法,可以在保存module前(_process_module)对module进行操作,从而定制化保存(允许根据需要修改保存时的键名和module本身,如其中的权重数值)。然而,当前该方法未支持保存新prefix,需要进行拓展。

modified: msmodelslim/core/quant_service/modelslim_v1/save/ascendv1.py
_process_module 中取消接受 ascendv1_save_module_preprocess 返回 None
modified: msmodelslim/core/quant_service/modelslim_v1/save/interface.py
ascendv1_save_module_preprocess 返回 (prefix, module) 的元组
modified: msmodelslim/model/qwen3_next/model_adapter.py
对应适配返回值变化
modified: test/cases/model/qwen3_next/test_model_adapter_qwen3_next.py
修复 ut

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 zhangz200102 的贡献)
ascend-robot
ascend-robot成员
2月3日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here

以下是根据您提交的修改文件推荐的Reviewer和Committer序列,需各模块评审通过后方可合入.

Module List Reviewers Committers
repo-Ascend/msmodelslim panyj1993, rookie_hongchuan, xiaoheng181, libarry, luyq11 wowenjie, panyj1993, joejoezhou
likedislike
ascend-robotascend-robot成员
2月3日 添加了label:ascend-cla/yes
zhangz200102成员
2月3日 评论:

compile

likedislike
ascend-robotascend-robot成员
2月3日 添加了label:ci-pipeline-running
ascend-robotascend-robot成员
2月3日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
2月3日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
2月3日 评论:
流水线 PR-pipeline_msmodelslim#272 已完成
阶段 任务名 状态 详情
编译构建 Build_msmodelslim ✅ >>>
恶意代码检查 Antipoison_MindStudio-ModelSlim ✅ >>>
编码安全与规范检查 CodeCheck_MindStudio-ModelSlim ✅ >>>
开源片段检查 SCA_MindStudio-ModelSlim ✅ >>>
开发者测试 UT_msmodelslim ✅ >>>
PreSmoke_msmodelslim ✅ >>>
流水线 PR-pipeline_msmodelslim ✅ >>>
likedislike
Zzhangz200102成员
2月3日 强制推送  1 个提交:df117692-【bugfix】ascendv1_save_module_preprocess 允许保存新prefix
ascend-robotascend-robot成员
2月3日 删除了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
2月3日 评论:

Notification

This pull request source branch has changed, so removes the following label(s): ci-pipeline-passed.

likedislike
zhangz200102成员
2月3日 评论:

compile

likedislike
ascend-robotascend-robot成员
2月3日 添加了label:ci-pipeline-running
Zzhangz200102成员
2月3日 关联了issue:[Bug]: ascendv1_save_module_preprocess方法未支持保存新prefix
ascend-robotascend-robot成员
2月3日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
2月3日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
2月3日 评论:
流水线 PR-pipeline_msmodelslim#274 已完成
阶段 任务名 状态 详情
编译构建 Build_msmodelslim ✅ >>>
恶意代码检查 Antipoison_MindStudio-ModelSlim ✅ >>>
编码安全与规范检查 CodeCheck_MindStudio-ModelSlim ✅ >>>
开源片段检查 SCA_MindStudio-ModelSlim ✅ >>>
开发者测试 UT_msmodelslim ✅ >>>
PreSmoke_msmodelslim ✅ >>>
流水线 PR-pipeline_msmodelslim ✅ >>>
likedislike
Zzhangz200102成员
2月3日 强制推送  1 个提交:bc1d887b-【bugfix】ascendv1_save_module_preprocess 允许保存新prefix
ascend-robotascend-robot成员
2月3日 删除了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
2月3日 评论:

Notification

This pull request source branch has changed, so removes the following label(s): ci-pipeline-passed.

likedislike
zhangz200102成员
2月3日 评论:

compile

likedislike
ascend-robotascend-robot成员
2月3日 添加了label:ci-pipeline-running
ascend-robotascend-robot成员
2月3日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
2月3日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
2月3日 评论:
流水线 PR-pipeline_msmodelslim#276 已完成
阶段 任务名 状态 详情
编译构建 Build_msmodelslim ✅ >>>
恶意代码检查 Antipoison_MindStudio-ModelSlim ✅ >>>
编码安全与规范检查 CodeCheck_MindStudio-ModelSlim ✅ >>>
开源片段检查 SCA_MindStudio-ModelSlim ✅ >>>
开发者测试 UT_msmodelslim ✅ >>>
PreSmoke_msmodelslim ✅ >>>
流水线 PR-pipeline_msmodelslim ✅ >>>
likedislike
joejoezhou成员2月5日进行代码检视2
msmodelslim/model/qwen3_next/model_adapter.py
已过期
@@ -122,1 +121,3 @@
121+ return prefix, new_module
122+ else:
123+ return prefix, module
joejoezhou2月5日评论:

【review】无需else,下一行减少缩进即可

likedislike
System
系统消息系统
2月5日 评论:

changed this line on db95043c view diff detail

Zzhangz200102成员
2月5日 强制推送  1 个提交:db95043c-【bugfix】ascendv1_save_module_preprocess 允许保存新prefix
ascend-robotascend-robot成员
2月5日 删除了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
2月5日 评论:

Notification

This pull request source branch has changed, so removes the following label(s): ci-pipeline-passed.

likedislike
ascend-robot
ascend-robot成员
2月5日 评论:

CLA Signature Pass

zhangz200102, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
Zzhangz200102成员
2月5日 解决了最后一个问题
zhangz200102成员
2月5日 评论:

compile

likedislike
ascend-robotascend-robot成员
2月5日 添加了label:ci-pipeline-running
ascend-robotascend-robot成员
2月5日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
2月5日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
2月5日 评论:
流水线 PR-pipeline_msmodelslim#299 已完成
阶段 任务名 状态 详情
编译构建 Build_msmodelslim ✅ >>>
恶意代码检查 Antipoison_MindStudio-ModelSlim ✅ >>>
编码安全与规范检查 CodeCheck_MindStudio-ModelSlim ✅ >>>
开源片段检查 SCA_MindStudio-ModelSlim ✅ >>>
开发者测试 UT_msmodelslim ✅ >>>
PreSmoke_msmodelslim ✅ >>>
流水线 PR-pipeline_msmodelslim ✅ >>>
likedislike
libowen
libowen成员
2月6日 评论:

/lgtm

likedislike
Zzhangz200102成员
2月6日 修改了pull request 的描述
Zzhangz200102成员
2月6日 修改了pull request 的描述
joejoezhou成员
2月6日 评论:

/lgtm
/approve

likedislike
ascend-robotascend-robot成员
2月6日 添加了label:approvedlgtm
ascend-robot
ascend-robot成员
2月6日 评论:

Review Guide

This Pull-Request Passes Review.
Committers who wrote a comment of /approve are: joejoezhou.
Reviewers who wrote a comment of /lgtm are: libarry, joejoezhou.

likedislike
ascend-robotascend-robot成员
2月6日 关闭了关联的issue
ascend-robotascend-robot成员
2月6日 合入了pull request