wptoux / albert-chinese-large-webqa

基于百度webqa与dureader数据集训练的Albert Large QA模型
Apache License 2.0
75 stars 15 forks source link

加载出错,不知道啥原因 #5

Closed CodeShaoNian closed 3 years ago

CodeShaoNian commented 3 years ago

Traceback (most recent call last): File "/data2//.conda/envs/py36/lib/python3.6/site-packages/transformers/modeling_utils.py", line 1062, in from_pretrained state_dict = torch.load(resolved_archive_file, map_location="cpu") File "/data2//.conda/envs/py36/lib/python3.6/site-packages/torch/serialization.py", line 527, in load with _open_zipfile_reader(f) as opened_zipfile: File "/data2//.conda/envs/py36/lib/python3.6/site-packages/torch/serialization.py", line 224, in init super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_orbuffer)) RuntimeError: version <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /pytorch/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at /pytorch/caffe2/serialize/inline_container.cc:132) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7f71c7b6b193 in /data2//.conda/envs/py36/lib/python3.6/site-packages/torch/lib/libc10.so) frame #1: caffe2::serialize::PyTorchStreamReader::init() + 0x1f5b (0x7f71cacf39eb in /data2//.conda/envs/py36/lib/python3.6/site-packages/torch/lib/libtorch.so) frame #2: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::string const&) + 0x64 (0x7f71cacf4c04 in /data2//.conda/envs/py36/lib/python3.6/site-packages/torch/lib/libtorch.so) frame #3: + 0x6c53a6 (0x7f7212c243a6 in /data2//.conda/envs/py36/lib/python3.6/site-packages/torch/lib/libtorch_python.so) frame #4: + 0x2961c4 (0x7f72127f51c4 in /data2//.conda/envs/py36/lib/python3.6/site-packages/torch/lib/libtorch_python.so)

frame #49: __libc_start_main + 0xf0 (0x7f7229a8f840 in /lib/x86_64-linux-gnu/libc.so.6) 我的版本: transformer 4.4.2 pytorch 1.4.0
wptoux commented 3 years ago

试着重装下pytorch,感觉是pytorch的问题。