diff --git a/spacy/cli/find_threshold.py b/spacy/cli/find_threshold.py index 6baa811d2..fdd3a9550 100644 --- a/spacy/cli/find_threshold.py +++ b/spacy/cli/find_threshold.py @@ -112,7 +112,7 @@ def find_threshold( if not hasattr(pipe, "scorer"): raise AttributeError(Errors.E1045) - if isinstance(pipe, TextCategorizer): + if type(pipe) == TextCategorizer: wasabi.msg.warn( "The `textcat` component doesn't use a threshold as it's not applicable to the concept of " "exclusive classes. All thresholds will yield the same results."