From 985dd2236c2c93d97a6fa77da6f3d5e69893bc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Fri, 13 Jan 2023 16:22:19 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Sofie Van Landeghem --- spacy/pipeline/trainable_pipe.pyx | 2 +- spacy/pipeline/transition_parser.pyx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/spacy/pipeline/trainable_pipe.pyx b/spacy/pipeline/trainable_pipe.pyx index fcc838d05..f0260c7c0 100644 --- a/spacy/pipeline/trainable_pipe.pyx +++ b/spacy/pipeline/trainable_pipe.pyx @@ -70,7 +70,7 @@ cdef class TrainablePipe(Pipe): teacher_pipe (Optional[TrainablePipe]): The teacher pipe to learn from. - examples (Iterable[Example]): Distillation examples. The eference + examples (Iterable[Example]): Distillation examples. The reference and predicted docs must have the same number of tokens and the same orthography. drop (float): dropout rate. diff --git a/spacy/pipeline/transition_parser.pyx b/spacy/pipeline/transition_parser.pyx index d0efa83c8..b0b3a0b96 100644 --- a/spacy/pipeline/transition_parser.pyx +++ b/spacy/pipeline/transition_parser.pyx @@ -221,7 +221,7 @@ cdef class Parser(TrainablePipe): teacher_pipe (Optional[TrainablePipe]): The teacher pipe to learn from. - examples (Iterable[Example]): Distillation examples. The eference + examples (Iterable[Example]): Distillation examples. The reference and predicted docs must have the same number of tokens and the same orthography. drop (float): dropout rate. @@ -315,8 +315,6 @@ cdef class Parser(TrainablePipe): RETURNS (Tuple[float, float]): The loss and the gradient. - RETURNS (Tuple[float, float]): The loss and the gradient. - DOCS: https://spacy.io/api/dependencyparser#get_teacher_student_loss """ loss_func = LegacySequenceCategoricalCrossentropy(normalize=False)