Hi! I am new to Prodigy and even though everything seems to be running smoothly, I am getting the following error when running the text cat.teach command:
Warning: Unnamed vectors – this won’t allow multiple vectors models to be loaded. (Shape: (0, 0))
Command:
python3.6 -m prodigy textcat.teach db de_core_news_sm ~/Downloads/input.csv --label mylabel --exclude db
Thanks for the report – this might be related to an issue in spaCy, which we’ve already fixed in the latest dev build. Could you try upgrading spaCy to v2.0.12.dev0 and see if this solves the problem?
Hey, I’m also encountering this error. On spacy 2.0.11.
I’ve also tried the dev build that you recommended above… And that didn’t fix it.
I don’t feel comfortable ignoring this warning, because I don’t really understand what it means.
I encounter the error when I run code to build a blank spacy model. My code looks roughly like:
nlp = spacy.blank('en')
ner = EntityRecognizer(nlp.vocab)
ner.add_label('ADD_SOME_LABELS')
nlp.add_pipe(ner)
nlp.add_pipe(SentenceSegmenter(nlp.vocab))
#some custom code to add my word2vec model vectors to the model
rows, cols = 0, 0
for i, line in enumerate(open(word2vec_bin_file, 'r')):
if i == 0:
rows, cols = line.split()
rows, cols = int(rows), int(cols)
nlp.vocab.reset_vectors(shape=(rows,cols))
else:
word, *vec = line.split()
vec = np.array([float(i) for i in vec])
nlp.vocab.set_vector(word, vec)
optimizer = nlp.begin_training(lambda: [])
The warning is generated from within nlp.begin_training