self-attentive-parser icon indicating copy to clipboard operation
self-attentive-parser copied to clipboard

Warning from torch 1.8.1

Open yanvirin opened this issue 3 years ago • 2 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?

yanvirin avatar Mar 30 '21 17:03 yanvirin

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.

nikitakit avatar May 02 '21 01:05 nikitakit

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

badvision avatar Dec 13 '22 14:12 badvision