From 91b0f0ff8cf256d499f6a33c6b32767eb6577eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danie=CC=88l=20de=20Kok?= Date: Thu, 12 Jan 2023 09:36:53 +0100 Subject: [PATCH] Make it clearer that `benchmark accuracy` is a replacement for `evaluate` --- website/docs/api/cli.mdx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/website/docs/api/cli.mdx b/website/docs/api/cli.mdx index 5c691fee1..5f10c8bc0 100644 --- a/website/docs/api/cli.mdx +++ b/website/docs/api/cli.mdx @@ -1136,8 +1136,19 @@ $ python -m spacy pretrain [config_path] [output_dir] [--code] [--resume-path] [ ## evaluate {id="evaluate",version="2",tag="command"} -Evaluate a trained pipeline. Expects a loadable spaCy pipeline (package name or -path) and evaluation data in the +The `evaluate` subcommand is superseded by +[`spacy benchmark accuracy`](#benchmark-accuracy). `evaluate` is provided as an +alias to `benchmark accuracy` for compatibility. + +## benchmark {id="benchmark", version="3.5"} + +The `spacy benchmark` CLI includes commands for benchmarking the accuracy and +speed of your spaCy pipelines. + +### accuracy {id="benchmark-accuracy", version="3.5", tag="command"} + +Evaluate the accuracy of a trained pipeline. Expects a loadable spaCy pipeline +(package name or path) and evaluation data in the [binary `.spacy` format](/api/data-formats#binary-training). The `--gold-preproc` option sets up the evaluation examples with gold-standard sentences and tokens for the predictions. Gold preprocessing helps the @@ -1148,7 +1159,7 @@ skew. To render a sample of dependency parses in a HTML file using the `--displacy-path` argument. ```bash -$ python -m spacy evaluate [model] [data_path] [--output] [--code] [--gold-preproc] [--gpu-id] [--displacy-path] [--displacy-limit] +$ python -m spacy benchmark accuracy [model] [data_path] [--output] [--code] [--gold-preproc] [--gpu-id] [--displacy-path] [--displacy-limit] ``` | Name | Description | @@ -1164,15 +1175,6 @@ $ python -m spacy evaluate [model] [data_path] [--output] [--code] [--gold-prepr | `--help`, `-h` | Show help message and available arguments. ~~bool (flag)~~ | | **CREATES** | Training results and optional metrics and visualizations. | -## benchmark {id="benchmark", version="3.5"} - -The `spacy benchmark` CLI includes commands for benchmarking the accuracy and -speed of your spaCy pipelines. - -### accuracy {id="benchmark-accuracy", version="3.5", tag="command"} - -This subcommand is an alias for [`spacy evaluate`](#evaluate). - ### speed {id="benchmark-speed", version="3.5", tag="command"} Benchmark the speed of a trained pipeline with a 95% confidence interval.