From b3c8ebba301059206e7f900e98e537c6ddcb1189 Mon Sep 17 00:00:00 2001 From: Maxi Date: Wed, 26 Apr 2023 09:07:07 +0200 Subject: [PATCH] added missing space in error message (#1726) * added missing space in error message * spaces in next line --- .../functional/classification/stat_scores.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/torchmetrics/functional/classification/stat_scores.py b/src/torchmetrics/functional/classification/stat_scores.py index 7df006df730..985a7236a2b 100644 --- a/src/torchmetrics/functional/classification/stat_scores.py +++ b/src/torchmetrics/functional/classification/stat_scores.py @@ -302,17 +302,17 @@ def _multiclass_stat_scores_tensor_validation( check = num_unique_values > num_classes if ignore_index is None else num_unique_values > num_classes + 1 if check: raise RuntimeError( - "Detected more unique values in `target` than `num_classes`. Expected only " - f"{num_classes if ignore_index is None else num_classes + 1} but found" - f"{num_unique_values} in `target`." + "Detected more unique values in `target` than `num_classes`. Expected only" + f" {num_classes if ignore_index is None else num_classes + 1} but found" + f" {num_unique_values} in `target`." ) if not preds.is_floating_point(): unique_values = torch.unique(preds) if len(unique_values) > num_classes: raise RuntimeError( - "Detected more unique values in `preds` than `num_classes`. Expected only " - f"{num_classes} but found {len(unique_values)} in `preds`." + "Detected more unique values in `preds` than `num_classes`. Expected only" + f" {num_classes} but found {len(unique_values)} in `preds`." )