登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
Gitee 2025 年度开源项目评选中
代码拉取完成,页面将自动刷新
开源项目
>
人工智能
>
AI-人工智能
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
101
Star
1.4K
Fork
943
GVP
MindSpore
/
mindformers
代码
Issues
129
Pull Requests
142
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
7557
更新权重测试用例
已合并
AAA碧根果批发赵少:master
MindSpore:master
AAA碧根果批发赵少
创建于 2025-10-25 16:53
克隆/下载
HTTPS
SSH
复制
下载 Email Patch
下载 Diff 文件
1. 更新权重测试用例 --- ### PR来源 - [x] issue单(#ID3TKB) - [ ] 需求特性 - [ ] 问题单 - [ ] 其他(社区开发者等) ### 修改描述(做了什么,变更了什么) - **修改原因:** 之前用例未能覆盖所有权重 - **修改内容:** - 通过新增train_configurations与infer_configurations来覆盖所有冲突的配置(mla VS 普通attention,mla融合权重 VS 分离权重,moe VS 全连接) - 新增量化相关配置,使看护范围扩展到量化权重 ### 功能验证 本次测试将推理网络中的`decoder.layers.0.self_attention.linear_proj.u_scale`中的`w_scale`改为`u_scale`来模拟测试失败 成功识别出差异: ```text ======================================================================================================================== FAILURES ========================================================================================================================= _________________________________________________________________________________________________________________ test_weight_consistency _________________________________________________________________________________________________________________ weight_tester = <tests.st.test_ut.test_models.test_gpt_weight_consistency.GPTModelWeightConsistencyTest object at 0xfffe93ce79a0> @pytest.mark.level0 @pytest.mark.platform_arm_ascend910b_training @pytest.mark.env_onecard def test_weight_consistency(weight_tester): """ Feature: Test the actual weight consistency check Description: Verify that the model weights remain consistent across different training and inference runs by comparing current weights with the golden standard reference Expectation: success """ differences = weight_tester.test_weight_consistency() > assert not differences, f"Weight consistency check failed, the differences are: {differences}" E AssertionError: Weight consistency check failed, the differences are: ["[infer] Missing weights: ['decoder.layers.0.self_attention.linear_proj.u_scale']", "[infer] Extra weights: ['decoder.layers.0.self_attention.linear_proj.w_scale']"] E assert not ["[infer] Missing weights: ['decoder.layers.0.self_attention.linear_proj.u_scale']", "[infer] Extra weights: ['decoder.layers.0.self_attention.linear_proj.w_scale']"] test_gpt_weight_consistency.py:330: AssertionError ``` ### check list - [ ] **是否经过代码检视** - [ ] **是否具备UT测试用例看护**(如不符合,请说明原因:____________________) - [ ] **是否涉及对外接口变更**(若涉及则完成变更说明) - [ ] **是否涉及公共组件或对外接口修改,涉及时需给出修改范围和影响评估**(请详细描述) - [安全编码checklist](https://gitee.com/mindspore/mindformers/wikis/%E5%AE%89%E5%85%A8%E7%BC%96%E7%A0%81%E6%A3%80%E8%A7%86) - [ ] 通过 - [ ] 不通过 - 网络红线:通信矩阵 | 全0监听 | 未公开接口 | 未公开公网地址 - 隐私数据:个人姓名、工号等 - 不安全函数: eval/pickle/yaml的使用 | subprocess.run和os.system的使用 - 文件校验:文件权限 | 临时文件保存 | 路径校验 ### 代码检视 - **要求:** - 合入代码超过1000行,需组织会议检视并附上检视结论 - 无功能验证不允许合入 - 自检项未完成,不允许合入 - 无UT看护,原则上不允许合入,需单独说明原因 - 来源未标识,修改描述不清晰,不允许合入 ### 变更说明 - [ ] **资料修改** - [ ] **变更通知(原有接口变动时涉及,版本接口公告):**
此 Pull Request 需要通过一些审核项
类型
指派人员
状态
审查
fft1374
suhaibo
Lin
hsshuai
wangjialin
已完成
(0/0人)
怎样手动合并此 Pull Request
git checkout master
git pull https://gitee.com/yiyison/mindformers.git master
git push origin master
评论
62
提交
1
文件
2
检查
代码问题
0
批量操作
展开设置
折叠设置
审查
Code Owner
审查人员
melody
cmy_melody
fft1374
fft1374
hsshuai
hss-shuai
wangjialin
wjlflyer
zyw_hw
zyw-hw
Xinrui Chen
chenrayray
jinyidou
jinyidou
yanghaoran
nicholas_yhr
Lin
Lin-Bert
suhaibo
suhaibo
zhulinhong
zhulinhong
AtlasAccount
atlasaccount
hpp034
hpp034
i-robot
I-am-a-robot
openLiBing-bot
openLiBing-bot
未设置
最少人数
0
测试
melody
cmy_melody
fft1374
fft1374
hsshuai
hss-shuai
wangjialin
wjlflyer
zyw_hw
zyw-hw
Xinrui Chen
chenrayray
jinyidou
jinyidou
yanghaoran
nicholas_yhr
Lin
Lin-Bert
suhaibo
suhaibo
zhulinhong
zhulinhong
AtlasAccount
atlasaccount
hpp034
hpp034
i-robot
I-am-a-robot
openLiBing-bot
openLiBing-bot
未设置
最少人数
0
优先级
不指定
严重
主要
次要
不重要
标签
approved
lgtm
mindspore-cla/yes
ci-pipeline-passed
SC-SUCC
pr-check-pass
关联 Issue
ID3TKB
【自提单】test_weight_consistency用例未能覆盖所有权重
Pull Request 合并后将关闭上述关联 Issue
里程碑
未关联里程碑
ZR-NEIYUAN
1.6.0
MindFormersTest
参与者
(6)
Python
1
https://gitee.com/mindspore/mindformers.git
git@gitee.com:mindspore/mindformers.git
mindspore
mindformers
mindformers
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册