Repository navigation
spaCy loads "spacy-transformers" library even when using CPU model #11926
|
Usually this is not a problem, but when running spaCy with Python optimize level set to 2 this would cause Error traceback: Could this behavior be changed to only load the Relevant code: Line 162 in df0cb4b |
Replies: 1 comment 3 replies
|
There's no way for spacy to use entry points like those for the additional architectures in I would suggest filing an issue in the (Also, due to issues with numpy and torch we haven't published |
There's no way for spacy to use entry points like those for the additional architectures in
spacy-transformerswithout loading the packages to some degree.I would suggest filing an issue in the
transformersrepo because this could be updated to check for whether__doc__is defined first, which they do in other places in the code. (I checked and couldn't find any related issues or PRs, but it's kind of hard to search for__doc__, so I might have missed something.)(Also, due to issues with numpy and torch we haven't published
spacy-transformerspackages that support the very newest version oftransformersyet, but I've tested newer releases oftransformersand they were fine even ifspacy…