diff --git a/spacy/tests/test_cli.py b/spacy/tests/test_cli.py index affb20f25..1c4d0c98f 100644 --- a/spacy/tests/test_cli.py +++ b/spacy/tests/test_cli.py @@ -883,7 +883,7 @@ def test_cli_find_threshold(capsys): }, ), ]: - doc = _nlp.make_doc(t[0]) + doc = nlp.make_doc(t[0]) docs.append(Example.from_dict(doc, t[1])) return docs diff --git a/website/docs/api/cli.md b/website/docs/api/cli.md index 5f5a8ce15..b42ba8a4f 100644 --- a/website/docs/api/cli.md +++ b/website/docs/api/cli.md @@ -1175,9 +1175,18 @@ thresholds - e.g. `textcat_multilabel` and `spancat`, but not `textcat`. Note that the full path to the corresponding threshold attribute in the config has to be provided. -```cli -$ python -m spacy find-threshold [model] [data_path] [pipe_name] [threshold_key] [scores_key] [--n_trials] [--code] [--use-gpu] [--gold-preproc] [--verbose] -``` +> #### Examples +> +> ```cli +> # For textcat_multilabel: +> $ python -m spacy find-threshold my_nlp data.spacy textcat_multilabel threshold cats_macro_f +> ``` +> +> ```cli +> # For spancat: +> $ python -m spacy find-threshold my_nlp data.spacy spancat threshold spans_sc_f +> ``` + | Name | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |