Skip to content

Commit

Permalink
Avoid returing numpy.float64 in calc_metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
chezou committed Dec 11, 2024
1 parent e999f88 commit 2d5ccf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rectools/metrics/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ def calc_metrics( # noqa # pylint: disable=too-many-branches,too-many-locals,t
if len(results) < expected_results_len:
warnings.warn("Custom metrics are not supported.")

return results
return {k: v.item() if hasattr(v, "item") else v for k, v in results.items()}

0 comments on commit 2d5ccf3

Please sign in to comment.