Skip to content
Discussion options

You must be logged in to vote

Don't use replace_listeners and instead create your custom pipeline with a custom transformer name. These are the kinds of changes you'd need in your config (just done for transformer+ner as an example). The main thing is to give the new transformer component a custom name and to also specify that name in upstream for the components listening to it:

--- /tmp/ner_orig.cfg	2023-11-09 08:28:52.807778529 +0100
+++ /tmp/ner.cfg	2023-11-09 08:28:42.927768314 +0100
@@ -10,7 +10,7 @@
 
 [nlp]
 lang = "en"
-pipeline = ["transformer","ner"]
+pipeline = ["custom_transformer","ner"]
 batch_size = 128
 disabled = []
 before_creation = null
@@ -41,29 +41,29 @@
 @architectures = "spacy-transformers.Tran…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SharbelWired
Comment options

Answer selected by SharbelWired
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training Training and updating models feat / config Feature: Training config feat / transformer Feature: Transformer
2 participants