From b9df4d6116eb970bbf7fb0f2fcd803927a2d35fc Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 5 Aug 2020 15:40:36 +0200 Subject: [PATCH 1/2] Fix textcat.begin_training if vectors set --- spacy/pipeline/textcat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/pipeline/textcat.py b/spacy/pipeline/textcat.py index 639ce5514..bc16e790f 100644 --- a/spacy/pipeline/textcat.py +++ b/spacy/pipeline/textcat.py @@ -355,7 +355,7 @@ class TextCategorizer(Pipe): for cat in y.cats: self.add_label(cat) self.require_labels() - docs = [Doc(Vocab(), words=["hello"])] + docs = [Doc(self.vocab, words=["hello"])] truths, _ = self._examples_to_truth(examples) self.set_output(len(self.labels)) self.model.initialize(X=docs, Y=truths) From 50c0e49741437c3475bc6527d4f1fed739bd3474 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 5 Aug 2020 15:40:47 +0200 Subject: [PATCH 2/2] Fix train CLI --- spacy/cli/train.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spacy/cli/train.py b/spacy/cli/train.py index 9b071ed55..7e9ec9ec9 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -144,6 +144,7 @@ def train( max_steps=T_cfg["max_steps"], eval_frequency=T_cfg["eval_frequency"], raw_text=None, + exclude=frozen_components ) msg.info(f"Training. Initial learn rate: {optimizer.learn_rate}") print_row = setup_printer(T_cfg, nlp)