Error when loading second lemmatizer pipeline after unloading the previous one #13020
Unanswered
abelbarrera15
asked this question in
Help: Installation
Replies: 1 comment
-
Could you clarify what you're trying to achieve? If you wish to disable a pipeline component, you can call the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm loading "en_core_web"sm" using spacy.load() -- after which I'm done using it, I'm unloading the lemmatizer by using nlp.remove_pipe('lemmatizer') -- after doing the previous and also del nlp.factories['lemmatizer'] even after using gc.collect() -- the "make_lemmatizer" function stays.
I can tell this because I get the following error after deleting the former model pipeline using "del" against the variable it saved against. Then loading "es_core_news_sm" using spacy.load().
ValueError: [E004] Can't set up pipeline component: a factory for 'lemmatizer' already exists. Existing factory: <function make_lemmatizer at 0x7f550f1af8c0>. New factory: <function make_lemmatizer at 0x7f5508c6db90>
From my POV, this should not be the case. Spacy should "clean up" the other artifacts that were used to make the lemmatizer when the lemmatizer pipe is removed. Could someone confirm this is expected before I submit a bug report? Or let me know if there is something else I should do?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions