question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

KeyError: "[E002] Can't find factory for ''tagger''

See original GitHub issue

Hi,

I’m trying to train tagger for Serbian from Jupiter notebook based on the process described on https://spacy.io/api/cli.

!python -m spacy debug-data sr {JSON_DIR}/file-train.json {JSON_DIR}/file-dev.json --pipeline ‘tagger’ --verbose and getting error: Training pipeline: ‘tagger’ [x] Pipeline component ‘‘tagger’’ not available in factories

when I try to train the tagger: !python -m spacy train sr {MODEL_DIR} {JSON_DIR}/file-train.json {JSON_DIR}/file-dev.json --pipeline ‘tagger’ --n-iter 2

I’m getting the following error: KeyError: “[E002] Can’t find factory for ‘‘tagger’’. This usually happens when spaCy calls nlp.create_pipe with a component name that’s not built in - for example, when constructing the pipeline from a model’s meta.json. If you’re using a custom component, you can write to Language.factories[''tagger''] or remove it from the model meta and add it via nlp.add_pipe instead.”

I cannot find anywhere how to add components into the factory. There is no spacy model for Serbian and I haven’t created it before.

Info about spaCy

  • spaCy version: 2.3.5
  • Platform: Windows-10-10.0.17763-SP0
  • Python version: 3.7.6

Thanks and regards, Danka,

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dankaivcommented, Jan 6, 2021

I tried with a smaller dataset and it worked but only for very small (few senetences on Jupyter) and around 100 in Spyder. Anyway, this training serves for educational purposes and has only 1500 sentences in the dataset and that shouldn’t be a problem. thanks for help!

0reactions
github-actions[bot]commented, Oct 28, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[E002] Can't find factory for 'tok2vec'. Where can I get ... - GitHub
KeyError : "[E002] Can't find factory for 'tok2vec'. This usually happens when spaCy calls `nlp.create_pipe` with a component name that's not ...
Read more >
Error while loading spacy [E002] Can't find factory for 'tok2vec'
KeyError : "[E002] Can't find factory for 'tok2vec'. This usually happens when spaCy calls `nlp.create_pipe` with a component name that's not ...
Read more >
Merge Entities Error - spacy - Prodigy Support
KeyError : "[E002] Can't find factory for 'tokenizer'. This usually happens when spaCy calls nlp.create_pipe with a component name that's not ...
Read more >
Tok2Vec · spaCy API Documentation
spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more....
Read more >
Error loading Spacy BERT model | Data Science and ... - Kaggle
KeyError : "[E002] Can't find factory for 'tok2vec'. This usually happens when spaCy calls nlp.create_pipe with a component name that's not built in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found