Merge pull request #7488 from Findus23/no-is-not

replace "is not" with !=
This commit is contained in:
Ines Montani 2021-03-19 01:53:38 +01:00 committed by GitHub
commit b878bc74b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,7 @@ def create_pretraining_model(nlp, pretrain_config):
# If the config referred to a Tok2VecListener, grab the original model instead # If the config referred to a Tok2VecListener, grab the original model instead
if type(tok2vec).__name__ == "Tok2VecListener": if type(tok2vec).__name__ == "Tok2VecListener":
original_tok2vec = ( 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 tok2vec = nlp.get_pipe(original_tok2vec).model
try: try: