Update warning and mention replace_listeners

This commit is contained in:
Ines Montani 2021-01-29 23:46:01 +11:00
parent 94232aea08
commit 7694f76dd1
2 changed files with 16 additions and 6 deletions

View File

@ -80,12 +80,22 @@ class Warnings:
# TODO: fix numbering after merging develop into master # TODO: fix numbering after merging develop into master
W086 = ("Component '{listener}' will be (re)trained, but it needs the component " W086 = ("Component '{listener}' will be (re)trained, but it needs the component "
"'{name}' which is frozen. You should either freeze both, or neither " "'{name}' which is frozen. You can either freeze both, or neither "
"of the two.") "of the two. If you're sourcing the component from "
"an existing pipeline, you can use the `replace_listeners` setting in "
"the config block to replace its token-to-vector listener with a copy "
"and make it independent. For example, `replace_listeners = "
"[\"model.tok2vec\"]` See the documentation for details: "
"https://nightly.spacy.io/usage/training#config-components-listeners")
W087 = ("Component '{name}' will be (re)trained, but the component '{listener}' " W087 = ("Component '{name}' will be (re)trained, but the component '{listener}' "
"depends on it and is frozen. This means that the performance of " "depends on it via a listener and is frozen. This means that the "
"'{listener}' will be degraded. You should either freeze both, or " "performance of '{listener}' will be degraded. You can either freeze "
"neither of the two.") "both, or neither of the two. If you're sourcing the component from "
"an existing pipeline, you can use the `replace_listeners` setting in "
"the config block to replace its token-to-vector listener with a copy "
"and make it independent. For example, `replace_listeners = "
"[\"model.tok2vec\"]` See the documentation for details: "
"https://nightly.spacy.io/usage/training#config-components-listeners")
W088 = ("The pipeline component {name} implements a `begin_training` " W088 = ("The pipeline component {name} implements a `begin_training` "
"method, which won't be called by spaCy. As of v3.0, `begin_training` " "method, which won't be called by spaCy. As of v3.0, `begin_training` "
"has been renamed to `initialize`, so you likely want to rename the " "has been renamed to `initialize`, so you likely want to rename the "

View File

@ -419,7 +419,7 @@ pipeline = ["parser", "ner", "textcat", "custom"]
frozen_components = ["parser", "custom"] frozen_components = ["parser", "custom"]
``` ```
<Infobox variant="warning" title="Shared Tok2Vec listener layer"> <Infobox variant="warning" title="Shared Tok2Vec listener layer" id="config-components-listeners">
When the components in your pipeline When the components in your pipeline
[share an embedding layer](/usage/embeddings-transformers#embedding-layers), the [share an embedding layer](/usage/embeddings-transformers#embedding-layers), the