Repository navigation
Possible to disable pipeline component by default? #13136
Answered
by
adrianeboyd
kinghuang
asked this question in
Help: Coding & Implementations
|
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) |
Answered by
adrianeboyd
Nov 20, 2023
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 |
1 reply
Answer selected by
kinghuang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, just disable the component before saving the pipeline, and it should be disabled by default on load.
The trained pipeline
corepackages all include a disabledsenter, if it helps to see a concrete example of what the config looks like.