已合并
【bugfix】ascendv1_save_module_preprocess 允许保存新prefix #106
zhangz200102创建于 2月3日
【bugfix】ascendv1_save_module_preprocess 允许保存新prefix #106
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 zhangz200102 的贡献)ascend-robot
2月3日 评论:
2月3日 评论:
ascend-robot
2月3日 评论:
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 |


2月3日 添加了label:ascend-cla/yes
zhangz200102
2月3日 评论:
2月3日 评论:
compile


2月3日 添加了label:ci-pipeline-running
2月3日 删除了label:ci-pipeline-running
2月3日 添加了label:ci-pipeline-passed
ascend-robot
2月3日 评论:
2月3日 评论:
2月3日 强制推送 1 个提交:df117692-【bugfix】ascendv1_save_module_preprocess 允许保存新prefix
2月3日 删除了label:ci-pipeline-passed
ascend-robot
2月3日 评论:
2月3日 评论:
zhangz200102
2月3日 评论:
2月3日 评论:
compile


2月3日 添加了label:ci-pipeline-running
2月3日 关联了issue:[Bug]: ascendv1_save_module_preprocess方法未支持保存新prefix
2月3日 删除了label:ci-pipeline-running
2月3日 添加了label:ci-pipeline-passed
ascend-robot
2月3日 评论:
2月3日 评论:
2月3日 强制推送 1 个提交:bc1d887b-【bugfix】ascendv1_save_module_preprocess 允许保存新prefix
2月3日 删除了label:ci-pipeline-passed
ascend-robot
2月3日 评论:
2月3日 评论:
zhangz200102
2月3日 评论:
2月3日 评论:
compile


2月3日 添加了label:ci-pipeline-running
2月3日 删除了label:ci-pipeline-running
2月3日 添加了label:ci-pipeline-passed
ascend-robot
2月3日 评论:
2月3日 评论:
msmodelslim/model/qwen3_next/model_adapter.py
已过期
@@ -122,1 +121,3 @@
121+ return prefix, new_module
122+ else:
123+ return prefix, module
【review】无需else,下一行减少缩进即可


2月5日 强制推送 1 个提交:db95043c-【bugfix】ascendv1_save_module_preprocess 允许保存新prefix
2月5日 删除了label:ci-pipeline-passed
ascend-robot
2月5日 评论:
2月5日 评论:
ascend-robot
2月5日 评论:
2月5日 评论:
2月5日 解决了最后一个问题
zhangz200102
2月5日 评论:
2月5日 评论:
compile


2月5日 添加了label:ci-pipeline-running
2月5日 删除了label:ci-pipeline-running
2月5日 添加了label:ci-pipeline-passed
ascend-robot
2月5日 评论:
2月5日 评论:
libowen
2月6日 评论:
2月6日 评论:
/lgtm


2月6日 修改了pull request 的描述
2月6日 修改了pull request 的描述
joejoezhou
2月6日 评论:
2月6日 评论:
/lgtm
/approve


2月6日 添加了label:approvedlgtm
ascend-robot
2月6日 评论:
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.


2月6日 关闭了关联的issue
2月6日 合入了pull request
当前模型适配器继承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