HarderThenHarder / transformers_tasks

⭐️ NLP Algorithms with transformers lib. Supporting Text-Classification, Text-Generation, Information-Extraction, Text-Matching, RLHF, SFT etc.
https://www.zhihu.com/column/c_1451236880973426688
2.15k stars 380 forks source link

UIE 实体事件抽取时报错_pickle.UnpicklingError: invalid load key, '<'. #4

Closed Yumeka999 closed 1 year ago

Yumeka999 commented 1 year ago

File "train.py", line 328, in train() File "train.py", line 249, in train model = torch.load(os.path.join(args.pretrained_model, 'pytorch_model.bin')) # 加载预训练好的UIE模型,模型结构见:model.UIE() File "D:\Dev_Utils\Anaconda3\lib\site-packages\torch\serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "D:\Dev_Utils\Anaconda3\lib\site-packages\torch\serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) _pickle.UnpicklingError: invalid load key, '<'.

HarderThenHarder commented 1 year ago

see here.