From 3c362ac5209d6e5a2f220a0181738c0c3b992d41 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Thu, 18 Mar 2021 21:09:11 +0100 Subject: [PATCH] replace "is not" with != --- spacy/training/pretrain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/training/pretrain.py b/spacy/training/pretrain.py index c791732db..6d7850212 100644 --- a/spacy/training/pretrain.py +++ b/spacy/training/pretrain.py @@ -142,7 +142,7 @@ def create_pretraining_model(nlp, pretrain_config): # If the config referred to a Tok2VecListener, grab the original model instead if type(tok2vec).__name__ == "Tok2VecListener": original_tok2vec = ( - tok2vec.upstream_name if tok2vec.upstream_name is not "*" else "tok2vec" + tok2vec.upstream_name if tok2vec.upstream_name != "*" else "tok2vec" ) tok2vec = nlp.get_pipe(original_tok2vec).model try: