Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanocerza committed Feb 15, 2024
1 parent 3b21158 commit 798c839
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions haystack/components/eval/statistical_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class StatisticalMetric(Enum):
@classmethod
def from_str(cls, metric: str) -> "StatisticalMetric":
map = {e.value: e for e in StatisticalMetric}
metric = map.get(string)
if metric is None:
metric_ = map.get(metric)
if metric_ is None:
raise ValueError(f"Unknown statistical metric '{metric}'")
return metric
return metric_


@component
Expand Down

0 comments on commit 798c839

Please sign in to comment.