Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模型无法导入 #146

Open
zhangxinpe opened this issue Jan 21, 2025 · 0 comments
Open

模型无法导入 #146

zhangxinpe opened this issue Jan 21, 2025 · 0 comments

Comments

@zhangxinpe
Copy link

你好,我是分别从pip以及源码安装的,尝试了不同的版本,但是load roberta模型时都报错,请问是不是roberta模型还是不能用呢
dep_parser=None
con_parser = None
from tqdm import tqdm
from supar import Parser
if dep_parser is None:
dep_parser = Parser.load('biaffine-dep-roberta-en')
if con_parser is None:
con_parser = Parser.load('crf-con-en')

File c:\Users\b418\anaconda3\envs\learn\lib\site-packages\torch\serialization.py:1097, in load(f, map_location, pickle_module, weights_only, mmap, **pickle_load_args)
1095 except RuntimeError as e:
1096 raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
-> 1097 return _load(
1098 opened_zipfile,
1099 map_location,
1100 pickle_module,
1101 overall_storage=overall_storage,
1102 **pickle_load_args,
...
1513 pass
1514 mod_name = load_module_mapping.get(mod_name, mod_name)
-> 1515 return super().find_class(mod_name, name)

ModuleNotFoundError: No module named 'supar.config'
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant