-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from_dlpack in spacy-transformers #741
Comments
The problem is a combination of too-old-torch + too-new-numpy. numpy v1.23 works with torch v1.10+, but not torch v1.9. |
There is no particularly good way to specify this in the package dependencies. |
I'm not sure I understand why it's the combination that's causing this error? (and if it is, that's a pretty unclear error for users). I'm mainly confused because the direct code path (the 2 alternative lines I cited) do in fact work... |
Daniël said that it's because the older version does not have |
This also came up in the coref PR in |
This is pretty bad though, because the error makes it look like there's an internal bug in Thinc/spaCy :( |
Maybe we should check the Torch version and raise a custom warning/error ourselves within Thinc? |
We haven't had any external reports of this so far, so my guess is that it's a pretty unusual version combination to have. If we add something, only as a warning and only on import? |
My initial reaction to this was to suspect that it was a bug in Thinc, but I also think this is not a version combination that normally happens in the wild. I think it's probably enough to have something that comes up in Google (like this thread) for the error message. Adding a warning at import would be fine too. |
Ok, good points. Let's close this and leave as-is for now. If we do get external reports, we can consider adding a warning. |
The test suite for
spacy-transformers
breaks in my local environment since PR #686e.g. when I run
test_model_sequence_classification
, it crashes at https://github.com/explosion/thinc/blob/master/thinc/util.py#L365:But, when I look at the code behind
from_dlpack
and run this directly (having confirmed my system doesn't hit theif
statement checking the device):Then the test flies through.
Can anyone reproduce the failing tests on the
spacy-transformers
test suite with a relatively newnumpy
?The text was updated successfully, but these errors were encountered: