nikitakit / self-attentive-parser

High-accuracy NLP parser with models for 11 languages.

Home Page:https://parser.kitaev.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning from torch 1.8.1

yanvirin opened this issue · comments

I get this warning each time when I run parsing:

```/home/yanvirin/.cache/pypoetry/virtualenvs/project-vignette-tzfHUOlI-py3.8/lib/python3.8/site-packages/torch/distributions/distribution.py:44: UserWarning: <class 'torch_struct.distributions.TreeCRF'> does not define arg_constraints. Please set `arg_constraints = {}` or initialize the distribution with `validate_args=False` to turn off validation.
warnings.warn(f'{self.class} does not define `arg_constraints`. ' +


It seems like the parser is working fine still.
Is that something I can ignore?

As far as I can tell, this is an issue with pytorch-struct (https://github.com/harvardnlp/pytorch-struct), and I don't see any way to suppress the warning from the benepar side. The warning is harmless, though.

I used this to silence the warnings from torch:
torch_struct.distributions.TreeCRF.arg_constraints = {}