explosion / spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python
https://spacy.io
MIT License
30.06k stars 4.4k forks source link

RuntimeError: from_dlpack received an invalid capsule. #12221

Closed tassosblackg closed 1 year ago

tassosblackg commented 1 year ago

How to reproduce the behaviour

 import spacy
 nlp = spacy.load('en_core_web_trf')
 tokens1 = nlp("My string")

Your Environment

Full Error:

RuntimeError: from_dlpack received an invalid capsule. Note that DLTensor capsules can be consumed only once, so you might have already constructed a tensor from it once.

adrianeboyd commented 1 year ago

Some combinations of torch and numpy don't work correctly together when the torch release is much older than the numpy release, see: https://github.com/explosion/thinc/issues/741

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it was answered and there was no follow-up discussion.

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.