Thanks for correcting me on the Spacy init-model part. I've tried both the 1 liner and the script file version and I'm still coming up empty. If I run either of the above 2 options I get a model written to disk without errors, but when I run prodigy ner.teach recipe_parse ./models/recipe_model ./data/ingredients.txt
it boots up the server fine but when I load the page the console gives me
File "cython_src/prodigy/components/sorters.pyx", line 151, in __iter__
File "cython_src/prodigy/components/sorters.pyx", line 61, in genexpr
File "cython_src/prodigy/models/ner.pyx", line 292, in __call__
File "cython_src/prodigy/models/ner.pyx", line 259, in get_tasks
File "cytoolz/itertoolz.pyx", line 1047, in cytoolz.itertoolz.partition_all.__next__
File "cython_src/prodigy/models/ner.pyx", line 217, in predict_spans
File "cython_src/prodigy/models/ner.pyx", line 60, in prodigy.models.ner._BatchBeam.__init__
File "/Users/sharkmaul/.pyenv/versions/3.6.4/lib/python3.6/site-packages/spacy/language.py", line 192, in entity
return self.get_pipe('ner')
File "/Users/sharkmaul/.pyenv/versions/3.6.4/lib/python3.6/site-packages/spacy/language.py", line 215, in get_pipe
raise KeyError(Errors.E001.format(name=name, opts=self.pipe_names))
KeyError: "[E001] No component 'ner' found in pipeline. Available names: ['sbd']"
Once I got that error I looked and found: Problem using a custom Word2Vec model, makes sense. I run the script again, this time adding the new pipe and get this just running the command
Traceback (most recent call last):
File "scripts/remove_pipe.py", line 5, in <module>
nlp.to_disk('models/recipe_model')
File "/Users/sharkmaul/.pyenv/versions/3.6.4/lib/python3.6/site-packages/spacy/language.py", line 615, in to_disk
util.to_disk(path, serializers, {p: False for p in disable})
File "/Users/sharkmaul/.pyenv/versions/3.6.4/lib/python3.6/site-packages/spacy/util.py", line 503, in to_disk
writer(path / key)
File "/Users/sharkmaul/.pyenv/versions/3.6.4/lib/python3.6/site-packages/spacy/language.py", line 613, in <lambda>
serializers[name] = lambda p, proc=proc: proc.to_disk(p, vocab=False)
File "nn_parser.pyx", line 893, in spacy.syntax.nn_parser.Parser.to_disk
File "/Users/sharkmaul/.pyenv/versions/3.6.4/lib/python3.6/site-packages/spacy/util.py", line 503, in to_disk
writer(path / key)
File "nn_parser.pyx", line 884, in spacy.syntax.nn_parser.Parser.to_disk.lambda3
TypeError: 'bool' object is not subscriptable
This seems related to: https://github.com/explosion/spaCy/issues/2482 (?)
Also while researching I saw a few posts that said weights needed to be initialized w/ begin_training
I tried:
nlp = spacy.blank('en')
nlp.begin_training()
nlp.to_disk('models/recipe_model'
But got Warning: Unnamed vectors -- this won't allow multiple vectors models to be loaded. (Shape: (0, 0))
I'm on:
OSX 10.14.5
Spacy 2.0.17
Prodigy 1.7.1
Python 3.6.4