From 10eb44d76a457e517bc601843fd236c008441658 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 23 Jun 2020 22:59:31 +0200 Subject: [PATCH] Remove debugging in parser --- spacy/syntax/nn_parser.pyx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spacy/syntax/nn_parser.pyx b/spacy/syntax/nn_parser.pyx index c75dfce83..582add021 100644 --- a/spacy/syntax/nn_parser.pyx +++ b/spacy/syntax/nn_parser.pyx @@ -263,9 +263,6 @@ cdef class Parser: free(is_valid) def update(self, examples, drop=0., set_annotations=False, sgd=None, losses=None): - # TODO: This is just here for debugging, remove later. - #for eg in examples: - # oracle_seq = self.moves.get_oracle_sequence(eg) if losses is None: losses = {} losses.setdefault(self.name, 0.) @@ -289,7 +286,7 @@ cdef class Parser: self.transition_states(states, scores) states_golds = [(s, g) for (s, g) in zip(states, golds) if not s.is_final()] backprop_tok2vec(golds) - if sgd is not None: + if sgd not in (None, False): self.model.finish_update(sgd) if set_annotations: docs = [eg.predicted for eg in examples]