yzhangcs / parser

:rocket: State-of-the-art parsers for natural language.
https://parser.yzhang.site/
MIT License
837 stars 143 forks source link

the checkpoint of 'biaffine-dep-roberta-en' is unavailable #112

Closed yisu0 closed 2 years ago

yisu0 commented 2 years ago

as the title

yzhangcs commented 2 years ago

@yisu0 Hi, could you tell me which version you use. I've installed the latest v1.1.4 and didn't not meet any issues.

>>> from supar import Parser
>>> parser = Parser.load('biaffine-dep-roberta-en')
>>> print(parser.predict(['She enjoys playing tennis .'.split()], verbose=False)[0])
1   She _   _   _   _   2   nsubj   _   _
2   enjoys  _   _   _   _   0   root    _   _
3   playing _   _   _   _   2   xcomp   _   _
4   tennis  _   _   _   _   3   dobj    _   _
5   .   _   _   _   _   2   punct   _   _
yisu0 commented 2 years ago

Thanks, it has been solved, there were some problems of the network.

YeJinPaark commented 1 year ago

what's the problems of the network?

I have the same issue like that

from supar import Parser parser=Parser.load('biaffine-dep-roberta-en') Downloading biaffine-dep-roberta-en to /root/.cache/supar/biaffine-dep-roberta-en Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/supar/utils/fn.py", line 335, in download torch.hub.download_url_to_file(url, path, progress=True) File "/opt/conda/lib/python3.10/site-packages/torch/hub.py", line 610, in download_url_to_file req = Request(url, headers={"User-Agent": "torch.hub"}) File "/opt/conda/lib/python3.10/urllib/request.py", line 322, in init self.full_url = url File "/opt/conda/lib/python3.10/urllib/request.py", line 348, in full_url self._parse() File "/opt/conda/lib/python3.10/urllib/request.py", line 377, in _parse raise ValueError("unknown url type: %r" % self.full_url) ValueError: unknown url type: 'biaffine-dep-roberta-en'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/opt/conda/lib/python3.10/site-packages/supar/parser.py", line 564, in load path = download(supar.MODEL[src].get(path, path), reload=reload) File "/opt/conda/lib/python3.10/site-packages/supar/utils/parallel.py", line 32, in wrapper value = fn(*args, **kwargs) File "/opt/conda/lib/python3.10/site-packages/supar/utils/fn.py", line 337, in download raise RuntimeError(f"File {url} unavailable. Please try other sources.") RuntimeError: File biaffine-dep-roberta-en unavailable. Please try other sources.

yzhangcs commented 1 year ago

@YeJinPaark Hi, if the pkg is installed from src, you may need to download the model with the name dep-biaffine-roberta-en

xinli2008 commented 1 year ago

您好,我运行了如下代码: pip install -U supar from supar import Parser parser = Parser.load('dep-biaffine-en') 错误信息为:ValueError: unknown url type: 'dep-biaffine-en' 我是需要将这个模型手动下载吗?如果需要的话,可以提供本模型的url吗? @yzhangcs

yzhangcs commented 1 year ago

@lxin1997 目前最新的代码对模型的名称有点更改,可以不用管,目前已经release最高版本为1.1.4,可以使用biaffine-dep-en这个名字

xinli2008 commented 1 year ago

好的,谢谢!另外,能否提供一下常用邮箱,有点nlp方向的小问题想向您咨询一下。如有打扰,还请原谅

yzhangcs commented 1 year ago

@lxin1997 邮箱主页有哈

YeJinPaark commented 1 year ago

download the model with the name dep-biaffine-roberta-en

how can i download the model?

yzhangcs commented 1 year ago

@YeJinPaark

Parser.load('dep-biaffine-roberta-en')