Error using GPU with the accuracy-pipeline (AttributeError: module 'torch._C' has no attribute '_cuda_setDevice') #7358
-
How to reproduce the behaviourI created a virtual environment and installed spacy with the following steps:
Then I tried to run the following code in the console within the created virtual environment: I get the following error message:
Note:
I expect that there is some update of torch when installing the accuracy pipeline using "python -m spacy download en_core_web_trf". The console outputs among others: Collecting torchcontrib<0.1.0,>=0.0.2 In the attachment you will find the installed packages of the virtual environment: What can I do to fix this error? Thank you a lot for your help in advance. Your Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, it sounds like something when wrong with the Uninstall all the torch-related packages (or just create a new conda env) and try the directions here for using the pytorch quickstart, using conda instead of pip to install torch after step 2 above: https://spacy.io/usage/embeddings-transformers#transformers-installation |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you very much for your quick response. You are absolutly right, now everything works very well. For completeness: The only change to the installation process described above is that I added the command |
Beta Was this translation helpful? Give feedback.
Hi, it sounds like something when wrong with the
torch
installation, which is unfortunately common with a plainpip install torch
. (torch
is being installed as a dependency ofen_core_web_trf
.)Uninstall all the torch-related packages (or just create a new conda env) and try the directions here for using the pytorch quickstart, using conda instead of pip to install torch after step 2 above: https://spacy.io/usage/embeddings-transformers#transformers-installation