-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Hello, I recently updated spacy to 3.0.3 (Windows 10, Python 3.7) and I am trying to build and debug a custom factory. As I find issues and errors in the factory, I would like to overwrite and re-add the factory to my Language.
Here is the code I'm working with:
@language.factory('my_factory')
def custom_factory(nlp: Language, name: str):
return NoneThe issue is that, after adding the factory for the first time using the @Language.factory decorator, I am running into an E004 error:
[E004] Can't set up pipeline component: a factory for 'my_factory' already exists. Existing factory: <function custom_factory at ...>. New factory: <function custom_factory at>
I understand that this is because I am trying to create two functions of the same name, but I can not figure out a way to delete a custom factory once it has been added to my Language. Can someone help me figure out how to simply remove this custom factory so that I can debug it and re-add it to my list? Thanks.
Metadata
Metadata
Assignees
Labels
No labels