Open hdaipteam opened 7 months ago
I assume this is harmless but users see warnings like this and get worried. Any idea when this warning will go away?
It seems that this was fixed back on Jan 3rd (source). It appears to me that Spacy does not require transformers (source), however spacy-transformers does (source) and allows for transformers >=3.4.0,<4.42.0
. The commit that fixed this belongs to 4.37.0
so @hdaipteam you might want to bump your local version of transformers
@nablabits I have been trying to fix the warning this morning, but it seems that the current latest version of spacy-transformers
doesn't have the relaxed constraint that is in the master
branch, but rather has <4.37.0
? I got this commit from the version tag: https://github.com/explosion/spacy-transformers/blob/ba6bf8202662f59aa1862bd4c5dd6fd0119a3335/requirements.txt
How to reproduce the behaviour
nlp = spacy.load("en_core_web_sm")
Your Environment
I cought the warning if I am loading the pre-defined model in both version of SpaCy Latest / Dev
python3.11/site-packages/transformers/utils/generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node(