You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am currently trying to set up an Ubuntu machine in order to train a spaCy model via GPU. Here is how I set everything up:
I started on a clean Ubuntu 18 machine with Python 3.7 and cuda 10.0
I created a venv
I installed spaCy via pip install spacy[cuda10] as described on https://spacy.io/usage/#gpu which should install cupy and thinc_gpu_ops, but it didn't install either. Furthermore I got this warning spacy 2.0.16 does not provide the extra 'cuda10'. I run into a similar warning when installing thinc with pip install thinc[cuda10]
I installed cupy
And then I just tried running the script and ran into this error:
File "/home/cuda/venv/lib/python3.7/site-packages/thinc/neural/_classes/hash_embed.py", line 51, in begin_update
keys = self.ops.hash(ids, self.seed) % self.nV
File "ops.pyx", line 821, in thinc.neural.ops.CupyOps.hash
NameError: name 'gpu_ops' is not defined
Which has been discussed over here: explosion/spaCy#1745 . But none of the answers helped me with the problem. Which is probably because the newest thinc version (which I use) had its gpu ops moved into a sperate package.
Thats why I tried to install thinc-gpu-ops manually with pip install thinc-gpu-ops, but I run into an error while compiling:
thinc_gpu_ops/gpu_ops.cpp:7861:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
error: command 'gcc' failed with exit status 1
I am fairly certain that all of this is due to some version mismatch, but I don't want to try all combinations, can anyone tell me which setup of versions is working?
Many thanks!
The text was updated successfully, but these errors were encountered:
Thank you for pointing that out. I tried it again using cuda 9.2. Furthermore I had to downgrade to Python 3.6.6 in order to install cupy-cuda92. And now it works!
The first few tests suggest a speedup of about 70%. That said, my GPU is only running at 12.2% right now.
Hi,
I am currently trying to set up an Ubuntu machine in order to train a spaCy model via GPU. Here is how I set everything up:
pip install spacy[cuda10]
as described on https://spacy.io/usage/#gpu which should install cupy and thinc_gpu_ops, but it didn't install either. Furthermore I got this warningspacy 2.0.16 does not provide the extra 'cuda10'
. I run into a similar warning when installing thinc withpip install thinc[cuda10]
And then I just tried running the script and ran into this error:
Which has been discussed over here: explosion/spaCy#1745 . But none of the answers helped me with the problem. Which is probably because the newest thinc version (which I use) had its gpu ops moved into a sperate package.
Thats why I tried to install thinc-gpu-ops manually with
pip install thinc-gpu-ops
, but I run into an error while compiling:I tried downgrading my gcc to 6, but to no avail.
My Environment
I am fairly certain that all of this is due to some version mismatch, but I don't want to try all combinations, can anyone tell me which setup of versions is working?
Many thanks!
The text was updated successfully, but these errors were encountered: