From 3ce9a3d2c4b11b06d0b1a923aad52cdc82daf32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danie=CC=88l=20de=20Kok?= Date: Fri, 20 Jan 2023 14:57:19 +0100 Subject: [PATCH] Pass optimizer to `TrainablePipe.distill` --- spacy/language.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spacy/language.py b/spacy/language.py index c3fa717b6..954f4c6e4 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -1092,12 +1092,10 @@ class Language: student_proc.distill( teacher_pipe, examples, - sgd=None, + sgd=sgd, losses=losses, **component_cfg[name], ) - if sgd is not None: - student_proc.finish_update(sgd) if name in annotates: for doc, eg in zip( _pipe(