spacy.require_gpu() is true but spacy cli uses CPU #7121
-
How to reproduce the behaviourUse the Quickstart guide on https://spacy.io/usage/training with GPU I run following code for testing GPU-availability: But when I run "i Using CPU" Tested that on my local windows machine and on AWS Sagemaker. Your EnvironmentWindows machine:
AWS Sagemaker:
The (important parts of the) config file look like that:
I got the config from https://spacy.io/usage/training "Quickstart" selecting "ner" and "GPU" and I have not changed anything there. After that I did the I expected that when |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is a good type of question for our new discussions board, so I'll transfer it over there in just a minute. You'll get an automatic message saying this issue is locked, but the discussion can continue on the open thread there. |
Beta Was this translation helpful? Give feedback.
-
Whether the GPU is enabled during training is not stored in the config itself, since you might want to use the same config on machines with and without GPUs. There's a command-line flag for python -m spacy train ./config.cfg --gpu-id 0 |
Beta Was this translation helpful? Give feedback.
Whether the GPU is enabled during training is not stored in the config itself, since you might want to use the same config on machines with and without GPUs. There's a command-line flag for
spacy train
to select the GPU, e.g.: