Possible to disable pipeline component by default? #13136
-
It's possible to disable a pipeline component on a loaded model using Language.disable_pipe and similar methods. But, is it possible to configure a pipeline component to be disabled by default on load? I would like to include a pipeline component that is disabled by default, and has to be explicitly enabled. The effect would be something like this, where a model has a pipeline component named nlp = spacy.load("some_model")
print(nlp.pipe_names)
nlp.enable_pipe("some_pipe")
print(nlp.pipe_names)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sure, just disable the component before saving the pipeline, and it should be disabled by default on load. The trained pipeline |
Beta Was this translation helpful? Give feedback.
Sure, just disable the component before saving the pipeline, and it should be disabled by default on load.
The trained pipeline
core
packages all include a disabledsenter
, if it helps to see a concrete example of what the config looks like.