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
With Spacy v2.1.0a10 installed using pip install spacy-nightly[cuda100]==v2.1.0a10 if I try to train the TextCategorizer with gpu backend enabled I get the following error:
nlp.update(texts, annotations, sgd=optimizer, drop=0.5, losses=losses)
File "/home/lstt/Projects/backend-sagemcom/venv/lib/python3.7/site-packages/spacy/language.py", line 449, in update
proc.update(docs, golds, drop=drop, sgd=get_grads, losses=losses)
File "pipes.pyx", line 918, in spacy.pipeline.pipes.TextCategorizer.update
File "/home/lstt/Projects/backend-sagemcom/venv/lib/python3.7/site-packages/thinc/neural/_classes/feed_forward.py", line 46, in begin_update
X, inc_layer_grad = layer.begin_update(X, drop=drop)
File "/home/lstt/Projects/backend-sagemcom/venv/lib/python3.7/site-packages/thinc/api.py", line 132, in begin_update
values = [fwd(X, *a, **k) for fwd in forward]
File "/home/lstt/Projects/backend-sagemcom/venv/lib/python3.7/site-packages/thinc/api.py", line 132, in <listcomp>
values = [fwd(X, *a, **k) for fwd in forward]
File "/home/lstt/Projects/backend-sagemcom/venv/lib/python3.7/site-packages/thinc/api.py", line 225, in wrap
output = func(*args, **kwargs)
File "/home/lstt/Projects/backend-sagemcom/venv/lib/python3.7/site-packages/thinc/neural/_classes/feed_forward.py", line 46, in begin_update
X, inc_layer_grad = layer.begin_update(X, drop=drop)
File "/home/lstt/Projects/backend-sagemcom/venv/lib/python3.7/site-packages/spacy/_ml.py", line 92, in _preprocess_doc
keys = ops.xp.concatenate(keys)
File "/home/lstt/Projects/backend-sagemcom/venv/lib/python3.7/site-packages/cupy/manipulation/join.py", line 49, in concatenate
return core.concatenate_method(tup, axis)
File "cupy/core/core.pyx", line 2805, in cupy.core.core.concatenate_method
File "cupy/core/core.pyx", line 2818, in cupy.core.core.concatenate_method
TypeError: Only cupy arrays can be concatenated
It seems to be an other occurrence of #1798. I have not experienced this problem with the alpha version v2.1.0a8.
This fix should be much more reliable than the previous patch in Thinc. We can later move this wrapper to Thinc, but for now it's useful to patch this without requiring a release.
How to reproduce the behaviour
With Spacy v2.1.0a10 installed using
pip install spacy-nightly[cuda100]==v2.1.0a10
if I try to train theTextCategorizer
with gpu backend enabled I get the following error:It seems to be an other occurrence of #1798. I have not experienced this problem with the alpha version v2.1.0a8.
Your Environment
The text was updated successfully, but these errors were encountered: