【问题描述】
使用部分MindSpore 2.5.0版本加载权重文件时,提示:
import mindspore as ms
ckpt_file = ‘xxxx’
ckpt = ms.load_checkpoint(ckpt_file)
错误提示:
Failed to read the checkpoint file xxxxx. May not have permission to read it, please check the correct of the file
【版本信息】
- MindSpore 2.5.0
【错误信息】
Failed to read the checkpoint file xxxxx. May not have permission to read it, please check the correct of the file
【根因分析】
权重文件拷贝传输过程中被异常修改导致
【处理过程】
对比能正常加载的权重和不能正常加载的权重的权限,都是400,所以并不是权限的问题。

怀疑是文件自身的问题,一共8个权重文件,通过md5sum对比现在加载的权重和原来保存出来的权重,发现加载失败的权重文件md5码不匹配
重新拷贝上传该文件后,问题解决。
【解决方案】
重新拷贝上传异常的权重文件,确保md5码能匹配后再进行操作。

