Optimizer created like the following:
optimizer = nlp.begin_training(device=0)
call to update
nlp.update(
[text],
[annotations],
drop=drop,
sgd=optimizer,
losses=losses)
throws exception
File "/usr/local/lib/python3.5/dist-packages/plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "/usr/local/lib/python3.5/dist-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/home/andrey/Work/Synqq/skyNLP/src/train_spacy.py", line 119, in main
losses=losses)
File "/usr/local/lib/python3.5/dist-packages/spacy/language.py", line 407, in update
proc.update(docs, golds, drop=drop, sgd=get_grads, losses=losses)
File "nn_parser.pyx", line 609, in spacy.syntax.nn_parser.Parser.update
File "nn_parser.pyx", line 712, in spacy.syntax.nn_parser.Parser._make_updates
File "/usr/local/lib/python3.5/dist-packages/thinc/api.py", line 67, in continue_update
gradient = callback(gradient, sgd)
File "/usr/local/lib/python3.5/dist-packages/spacy/_ml.py", line 552, in finish_update
return ops.unflatten(d_X, lengths, pad=0)
File "ops.pyx", line 140, in thinc.neural.ops.Ops.unflatten
TypeError: slice indices must be integers or None or have an __index__ method
Python: 3.5.2
Spacy: 2.0.5
Ubuntu: 16.04
thinc: 6.10.2
cupy: 2.2.0
I am facing the same issue!
Any news on that?
This is a still existing issue. Bump.
This is the same as in https://github.com/explosion/spaCy/issues/1938 and https://github.com/explosion/spaCy/issues/1806. Many people are facing this issue right now.
@ines @honnibal
Should now be fixed.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I am facing the same issue!
Any news on that?