We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 872a76e commit 226d999Copy full SHA for 226d999
src/fev/metrics.py
@@ -49,8 +49,7 @@ def get_metric(metric: MetricConfig) -> Metric:
49
if isinstance(metric, str):
50
return metric_type()
51
elif isinstance(metric, dict):
52
- metric_name = metric.pop("name")
53
- return metric_type(**metric)
+ return metric_type(**{k: v for k, v in metric.items() if k != "name"})
54
else:
55
raise ValueError(f"Invalid metric configuration: {metric}")
56
0 commit comments