Old Error: Only cupy arrays can be concatenated

i am playing around with prodigy currently to get used to its basic functionalities.
most likely i am doing something wrong here.

Running on:

Spacy 3.3.0
Prodigy  1.11.7

Calling

python -m prodigy train --ner db_skill_init -m de_dep_news_trf -es 0.2

works just fine.

Calling

python -m prodigy train --ner db_skill_init -m de_dep_news_trf -es 0.2 --gpu-id 0

throws error "Only cupy arrays can be concatenated" which was marked as solved 3 years ago (see: TextCategorizer: TypeError: Only cupy arrays can be concatenated on v2.1.0a10 · Issue #3355 · explosion/spaCy · GitHub) :confused:

Made a fresh install of Spacy, Prodigy & thinc, still get the error :frowning:

> 2022-05-16 07:51:28,371] [INFO] Set up nlp object from config
> Components: ner
> Merging training and evaluation data for 1 components
>   - [ner] Training: 115 | Evaluation: 28 (20% split)
> Training: 115 | Evaluation: 28
> Labels: ner (2)
> [2022-05-16 07:51:28,577] [INFO] Pipeline: ['tok2vec', 'transformer', 'tagger', 'morphologizer', 'parser', 'lemmatizer', 'attribute_ruler', 'ner']
> [2022-05-16 07:51:28,577] [INFO] Resuming training for: ['transformer']
> [2022-05-16 07:51:28,585] [INFO] Created vocabulary
> [2022-05-16 07:51:28,586] [INFO] Finished initializing nlp object
> Traceback (most recent call last):
>   File "C:\Users\Jan\anaconda3\lib\runpy.py", line 197, in _run_module_as_main
>     return _run_code(code, main_globals, None,
>   File "C:\Users\Jan\anaconda3\lib\runpy.py", line 87, in _run_code
>     exec(code, run_globals)
>   File "C:\Users\Jan\AppData\Roaming\Python\Python39\site-packages\prodigy\__main__.py", line 61, in <module>
>     controller = recipe(*args, use_plac=True)
>   File "cython_src\prodigy\core.pyx", line 329, in prodigy.core.recipe.recipe_decorator.recipe_proxy
>   File "C:\Users\Jan\AppData\Roaming\Python\Python39\site-packages\plac_core.py", line 367, in call
>     cmd, result = parser.consume(arglist)
>   File "C:\Users\Jan\AppData\Roaming\Python\Python39\site-packages\plac_core.py", line 232, in consume
>     return cmd, self.func(*(args + varargs + extraopts), **kwargs)
>   File "C:\Users\Jan\AppData\Roaming\Python\Python39\site-packages\prodigy\recipes\train.py", line 278, in train
>     return _train(
>   File "C:\Users\Jan\AppData\Roaming\Python\Python39\site-packages\prodigy\recipes\train.py", line 190, in _train
>     nlp = spacy_init_nlp(config, use_gpu=gpu_id)
>   File "C:\Users\Jan\anaconda3\lib\site-packages\spacy\training\initialize.py", line 84, in init_nlp
>     nlp.initialize(lambda: train_corpus(nlp), sgd=optimizer)
>   File "C:\Users\Jan\anaconda3\lib\site-packages\spacy\language.py", line 1309, in initialize
>     proc.initialize(get_examples, nlp=self, **p_settings)
>   File "C:\Users\Jan\anaconda3\lib\site-packages\spacy\pipeline\tok2vec.py", line 220, in initialize
>     self.model.initialize(X=doc_sample)
>   File "C:\Users\Jan\anaconda3\lib\site-packages\thinc\model.py", line 299, in initialize
>     self.init(self, X=X, Y=Y)
>   File "C:\Users\Jan\anaconda3\lib\site-packages\thinc\layers\chain.py", line 90, in init
>     curr_input = layer.predict(curr_input)
>   File "C:\Users\Jan\anaconda3\lib\site-packages\thinc\model.py", line 315, in predict
>     return self._func(self, X, is_train=False)[0]
>   File "C:\Users\Jan\anaconda3\lib\site-packages\thinc\layers\with_array.py", line 40, in forward
>     return _list_forward(cast(Model[List2d, List2d], model), Xseq, is_train)
>   File "C:\Users\Jan\anaconda3\lib\site-packages\thinc\layers\with_array.py", line 75, in _list_forward
>     Xf = layer.ops.flatten(Xs, pad=pad)  # type: ignore
>   File "C:\Users\Jan\anaconda3\lib\site-packages\thinc\backends\ops.py", line 250, in flatten
>     result = xp.concatenate(X)
>   File "<__array_function__ internals>", line 5, in concatenate
>   File "cupy\_core\core.pyx", line 1613, in cupy._core.core.ndarray.__array_function__
>   File "C:\Users\Jan\anaconda3\lib\site-packages\cupy\_manipulation\join.py", line 60, in concatenate
>     return _core.concatenate_method(tup, axis, out, dtype, casting)
>   File "cupy\_core\_routines_manipulation.pyx", line 534, in cupy._core._routines_manipulation.concatenate_method
>   File "cupy\_core\_routines_manipulation.pyx", line 553, in cupy._core._routines_manipulation.concatenate_method
> TypeError: Only cupy arrays can be concatenated