From a54efef469bdfd3b4fa5d0e895c08b775ed41e76 Mon Sep 17 00:00:00 2001 From: shadeMe Date: Mon, 6 Mar 2023 10:30:55 +0530 Subject: [PATCH] Remove `update` calls from test --- spacy/tests/pipeline/test_tok2vec.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spacy/tests/pipeline/test_tok2vec.py b/spacy/tests/pipeline/test_tok2vec.py index 9d7265fbb..6929b76fa 100644 --- a/spacy/tests/pipeline/test_tok2vec.py +++ b/spacy/tests/pipeline/test_tok2vec.py @@ -602,10 +602,6 @@ def test_tok2vec_distillation_teacher_annotations(): ) optimizer = teacher_nlp.initialize(lambda: train_examples_teacher) - for i in range(50): - losses = {} - teacher_nlp.update(train_examples_teacher, sgd=optimizer, losses=losses) - student_nlp.initialize(lambda: train_examples_student) # Since Language.distill creates a copy of the examples to use as @@ -626,6 +622,4 @@ def test_tok2vec_distillation_teacher_annotations(): return out student_tok2vec.distill = tok2vec_distill_wrapper.__get__(student_tok2vec, Tok2Vec) - student_nlp.distill( - teacher_nlp, train_examples_student, sgd=optimizer, losses=losses - ) + student_nlp.distill(teacher_nlp, train_examples_student, sgd=optimizer, losses={})