-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Agnostic vocab array fix #4680
Agnostic vocab array fix #4680
Conversation
I would like to create a regression but would need some insight on how to do it with with |
Building a new spacy wheel and testing this patch on colab does indeed fix the |
I really need this patch, when will it be merged? |
Same. Not sure if a test needs to be created in order to merge this @honnibal? I can try and work on it more today. Otherwise, you could always pull from my fork'd branch and build the wheel locally (which is what I did). |
@mmaybeno I can't figure out how to build the package from source with cuda100 support. How do I do that? I just tried |
While in the container run:
Check the dist for the wheel. You can pip install it like normal
|
@mmaybeno Wow, that's more complicated than I would have thought :) Thanks! |
If you want to keep it as a wheel and install it in a container. That is what I did at least :). I'm sure you can do it another way. |
@mmaybeno Your branch works fine for me. I now have |
Thanks! If you need patches urgently, you can build yourself a dev version by checking out the repo. We do try to get simple fixes like this released quickly though. The testing on GPU is a persistent problem, which is how these errors creep in. Unfortunately we don't have CI support for GPU. @rjurney thanks for the confirmation the patch works for you. In the absence of CI, that's super helpful for this sort of patch. |
Can you please specify instructions on how to use this patch |
@kadu9 look at the docker build I posted above. Now that things are merged into master though you can target the To be specific
|
Fixes a bug where we were not getting the correct array module when returning a vector in Vocab.
Description
Fixes issue related to #4673. This issue causes a
TypeError
when trying to do any calculations related to the vectors where a word is not in the Vocab list. This leads to mixed array types (in our casenumpy
andcupy
arrays).Types of change
The change is doing what is done in other parts of the code where we first get the appropriate array module prior to any calculations. Removing
numpy
withget_array_module
.Checklist