From fceb6242681448eeac431910f2fd42a448e21198 Mon Sep 17 00:00:00 2001
From: Yoann Schneider <yschneider@teklia.com>
Date: Mon, 10 Mar 2025 10:34:46 +0000
Subject: [PATCH] Apply 2 suggestion(s) to 2 file(s)

Co-authored-by: Eva Bardou <bardou@teklia.com>
---
 dan/ocr/evaluate.py          | 3 ++-
 docs/usage/evaluate/index.md | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dan/ocr/evaluate.py b/dan/ocr/evaluate.py
index ce88f315..cb2bf6c8 100644
--- a/dan/ocr/evaluate.py
+++ b/dan/ocr/evaluate.py
@@ -84,10 +84,11 @@ def add_evaluate_parser(subcommands) -> None:
         type=Path,
     )
 
+    pretty_splits = map(lambda split: f"`{split}`", SPLIT_NAMES)
     parser.add_argument(
         "--sets",
         dest="set_names",
-        help="Where to save evaluation results in JSON format.",
+        help=f"Sets to evaluate. Defaults to {', '.join(pretty_splits)}."
         default=SPLIT_NAMES,
         nargs="+",
     )
diff --git a/docs/usage/evaluate/index.md b/docs/usage/evaluate/index.md
index c672b466..ad5fe49d 100644
--- a/docs/usage/evaluate/index.md
+++ b/docs/usage/evaluate/index.md
@@ -25,7 +25,7 @@ This will, for each evaluated split:
 | `--config`           | Path to the configuration file.                                                                                                                                                                          | `pathlib.Path` |                            |
 | `--nerval-threshold` | Distance threshold for the match between gold and predicted entity during Nerval evaluation. `0` would impose perfect matches, `1` would allow completely different strings to be considered as a match. | `float`        | `0.3`                      |
 | `--output-json`      | Where to save evaluation results in JSON format.                                                                                                                                                         | `pathlib.Path` | `None`                     |
-| `--sets`             | Which sets should be evaluated.                                                                                                                                                                          | `str`          | `["train", "val", "test"]` |
+| `--sets`             | Sets to evaluate. Defaults to `train`, `val`, `test`.                                                                                                                                                    | `list[str]`    | `["train", "val", "test"]` |
 
 ## Examples
 
-- 
GitLab