          if not isinstance(label, str):
              raise ValueError(Errors.E187)
          if label in self.labels:
              return 0
          if self.model not in (True, False, None):
              # Here's how the model resizing will work, once the
              # neuron-to-tag mapping is no longer controlled by
              # the Morphology class, which sorts the tag names.
              # The sorting makes adding labels difficult.
              # smaller = self.model._layers[-1]
 
</s> remove         if self.model not in (None, True, False):
 </s> add         if self.model.has_dim("nO"): </s> remove         if "nr_class" in self.cfg:
            self.cfg["nr_class"] = self.moves.n_moves
        if self.model not in (True, False, None):
            self.model.resize_output(self.moves.n_moves)
 </s> add         self.model.resize_output(self.moves.n_moves) </s> remove     @classmethod
    def Model(cls, n_tags=None, **cfg):
        if cfg.get("pretrained_dims") and not cfg.get("pretrained_vectors"):
            raise ValueError(TempErrors.T008)
        if "tok2vec" in cfg:
            tok2vec = cfg["tok2vec"]
        else:
            config = {
                "width": cfg.get("token_vector_width", 96),
                "embed_size": cfg.get("embed_size", 2000),
                "pretrained_vectors": cfg.get("pretrained_vectors", None),
                "window_size": cfg.get("window_size", 1),
                "cnn_maxout_pieces": cfg.get("cnn_maxout_pieces", 3),
                "subword_features": cfg.get("subword_features", True),
                "char_embed": cfg.get("char_embed", False),
                "conv_depth": cfg.get("conv_depth", 4),
                "bilstm_depth": cfg.get("bilstm_depth", 0),
            }
            tok2vec = Tok2Vec(**config)
        return build_tagger_model(n_tags, tok2vec)

 </s> add  </s> remove         self.cfg.setdefault("cnn_maxout_pieces", 2)
        self.cfg.setdefault("subword_features", True)
        self.cfg.setdefault("token_vector_width", 12)
        self.cfg.setdefault("conv_depth", 1)
        self.cfg.setdefault("pretrained_vectors", None)
 </s> add  </s> remove     mock.assert_called_once_with(ANY, nlp, foo="bar")
 </s> add     # The model will be initialized to None by the factory
    mock.assert_called_once_with(ANY, nlp, None, foo="bar")
        if self.model.has_dim("nO"):
          if not isinstance(label, str):
              raise ValueError(Errors.E187)
          if label in self.labels:
              return 0
        if self.model.has_dim("nO"):
              # Here's how the model resizing will work, once the
              # neuron-to-tag mapping is no longer controlled by
              # the Morphology class, which sorts the tag names.
              # The sorting makes adding labels difficult.
              # smaller = self.model._layers[-1]
keep keep keep keep replace keep keep keep keep keep
 Default settings to configurations (#4995)

* fix grad_clip naming

* cleaning up pretrained_vectors out of cfg

* further refactoring Model init's

* move Model building out of pipes

* further refactor to require a model config when creating a pipe

* small fixes

* making cfg in nn_parser more consistent

* fixing nr_class for parser

* fixing nn_parser's nO

* fix printing of loss

* architectures in own file per type, consistent naming

* convenience methods default_tagger_config and default_tok2vec_config

* let create_pipe access default config if available for that component

* default_parser_config

* move defaults to separate folder

* allow reading nlp from package or dir with argument 'name'

* architecture spacy.VocabVectors.v1 to read static vectors from file

* cleanup

* default configs for nel, textcat, morphologizer, tensorizer

* fix imports

* fixing unit tests

* fixes and clean up

* fixing defaults, nO, fix unit tests

* restore parser IO

* fix IO

* 'fix' serialization test

* add *.cfg to manifest

* fix example configs with additional arguments

* replace Morpohologizer with Tagger

* add IO bit when testing overfitting of tagger (currently failing)

* fix IO - don't initialize when reading from disk

* expand overfitting tests to also check IO goes OK

* remove dropout from HashEmbed to fix Tagger performance

* add defaults for sentrec

* update thinc

* always pass a Model instance to a Pipe

* fix piped_added statement

* remove obsolete W029

* remove obsolete errors

* restore byte checking tests (work again)

* clean up test

* further test cleanup

* convert from config to Model in create_pipe

* bring back error when component is not initialized

* cleanup

* remove calls for nlp2.begin_training

* use thinc.api in imports

* allow setting charembed's nM and nC

* fix for hardcoded nM/nC + unit test

* formatting fixes

* trigger build 
spacy/pipeline/pipes.pyx