Version incompatibility between Spacy, Cuda, Pytorch and Python #13362
-
I want run spacy in GPu. The configuration that I installed for the Spacy is defined below The Cuda configuration that have in my Ubuntu 20.04.1 LTS based machine is nvcc: NVIDIA (R) Cuda compiler driver I have a restriction to upgrade the Cuda. The PyTorch version that I have installed on the machine is "2.2.1+cu121" which have no support for the Cuda version I have. I tried to downgrade the Pytorch and found that I need to downgrade the Python version as well. My current python version is Python 3.12.2. If I go for a compatible Python version for pytorch that should be >=3.6,<3.7.0 for pytorch 1.4.0. If I downgrade both Pytorch and Python that is not compatible with Spacy version. I need to do a transformer-based NER task in Spacy. Therefore I am not sure what is the minimum requirement of spacy. How can I handle this version incompatibility? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! So to summarize, you said that:
Right? To get a version of spaCy that is compatible with a specific PyTorch version, you'll have to look at Thinc - this is spaCy's Machine Learning library that is in charge of connecting to PyTorch functionality. The current version 8.2.3 uses However, it looks like torch 1.7.0 should also be compatible with Cuda 10.1, so I suggest you try that. |
Beta Was this translation helpful? Give feedback.
Hi!
So to summarize, you said that:
Right?
To get a version of spaCy that is compatible with a specific PyTorch version, you'll have to look at Thinc - this is spaCy's Machine Learning library that is in charge of connecting to PyTorch functionality. The current version 8.2.3 uses
torch>=1.6.0
so that won't work for you in combination with PyTorch 1.4.0.However, it looks like torch 1.7.0 should also be compatible with Cuda 10.1, so I suggest you try that.