Skip to content
Snippets Groups Projects
Commit c0eb5bb8 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Merge branch 'metrics-percentages' into 'main'

Display metrics as percentages during evaluation

Closes #241

See merge request !335
parents f02b2d12 07d61dc0
No related branches found
No related tags found
1 merge request!335Display metrics as percentages during evaluation
......@@ -93,6 +93,7 @@ def add_metrics_table_row(
continue
metric_name = REVERSE_HEADER[column]
row.append(metrics.get(metric_name, ""))
metric_value = metrics.get(metric_name)
row.append(round(metric_value * 100, 2) if metric_value is not None else "")
table.add_row(row)
| Split | CER (HTR-NER) | CER (HTR) | WER (HTR-NER) | WER (HTR) | WER (HTR no punct) |
|:-----:|:-------------:|:---------:|:-------------:|:---------:|:------------------:|
| train | 1.3023 | 1.3023 | 1.0 | 1.0 | 1.0 |
| val | 1.2683 | 1.2683 | 1.0 | 1.0 | 1.0 |
| test | 1.1224 | 1.1224 | 1.0 | 1.0 | 1.0 |
| train | 130.23 | 130.23 | 100.0 | 100.0 | 100.0 |
| val | 126.83 | 126.83 | 100.0 | 100.0 | 100.0 |
| test | 112.24 | 112.24 | 100.0 | 100.0 | 100.0 |
......@@ -44,7 +44,7 @@ def test_add_metrics_table_row():
"WER (HTR-NER)",
"NER",
]
assert metrics_table.rows == [["train", 1.3023, 1.0, ""]]
assert metrics_table.rows == [["train", 130.23, 100, ""]]
@pytest.mark.parametrize(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment