You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/opt/conda/lib/python3.10/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.23.5
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Downloading: https://github.com/yzhangcs/parser/releases/download/v1.1.0/ptb.crf.con.lstm.char.zip to /root/.cache/supar/ptb.crf.con.lstm.char.zip
TypeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 from lingfeat import extractor
File /opt/conda/lib/python3.10/site-packages/lingfeat/init.py:1
----> 1 from lingfeat.extractor import pass_text
It seems that the error is from the SuPAR dependency. This package is not updated often and is not very flexible with present-day Numpy Scipy, etc. This is also why I refactored LingFeat to LFTK for minimal external dependencies. Most features in LingFeat are also obtainable through LFTK.
But as a quick fix, have you tried downgrading Numpy?
/opt/conda/lib/python3.10/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.23.5
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Downloading: https://github.com/yzhangcs/parser/releases/download/v1.1.0/ptb.crf.con.lstm.char.zip to /root/.cache/supar/ptb.crf.con.lstm.char.zip
TypeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 from lingfeat import extractor
File /opt/conda/lib/python3.10/site-packages/lingfeat/init.py:1
----> 1 from lingfeat.extractor import pass_text
File /opt/conda/lib/python3.10/site-packages/lingfeat/extractor.py:63
61 # load models
62 NLP = spacy.load('en_core_web_sm')
---> 63 SuPar = Parser.load('crf-con-en')
66 class pass_text:
68 """
69 Initialize pipeline
70
(...)
76 - self.NLP_doc: spacy pipeline object
77 """
File /opt/conda/lib/python3.10/site-packages/supar/parsers/parser.py:194, in Parser.load(cls, path, reload, src, checkpoint, **kwargs)
192 args = Config(**locals())
193 args.device = 'cuda' if torch.cuda.is_available() else 'cpu'
--> 194 state = torch.load(path if os.path.exists(path) else download(supar.MODEL[src].get(path, path), reload=reload))
195 cls = supar.PARSER[state['name']] if cls.NAME is None else cls
196 args = state['args'].update(args)
File /opt/conda/lib/python3.10/site-packages/supar/utils/fn.py:167, in download(url, reload)
165 sys.stderr.write(f"Downloading: {url} to {path}\n")
166 try:
--> 167 torch.hub.download_url_to_file(url, path, progress=True)
168 except urllib.error.URLError:
169 raise RuntimeError(f"File {url} unavailable. Please try other sources.")
File /opt/conda/lib/python3.10/site-packages/torch/hub.py:630, in download_url_to_file(url, dst, hash_prefix, progress)
628 if hash_prefix is not None:
629 sha256 = hashlib.sha256()
--> 630 with tqdm(total=file_size, disable=not progress,
631 unit='B', unit_scale=True, unit_divisor=1024) as pbar:
632 while True:
633 buffer = u.read(8192)
TypeError: nop() missing 1 required positional argument: 'it'
The text was updated successfully, but these errors were encountered: