Skip to content

Commit

Permalink
Merge pull request #446 from sdtblckgov/patch-4
Browse files Browse the repository at this point in the history
Bugfix for metric aggregation
  • Loading branch information
dragonstyle authored Sep 18, 2024
2 parents 8a4e5a8 + 1e37099 commit 61e3415
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inspect_ai/_eval/task/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def scorer_for_metrics(
# in the dictionary into a result
if isinstance(metric_value, dict):
for metric_key, value in metric_value.items():
if value:
if value is not None:
name = metrics_unique_key(metric_key, list(list_metrics.keys()))
list_metrics[name] = EvalMetric(
name=name,
Expand All @@ -193,7 +193,7 @@ def scorer_for_metrics(
# into a result
elif isinstance(metric_value, list):
for index, value in enumerate(metric_value):
if value:
if value is not None:
count = str(index + 1)
name = metrics_unique_key(
with_suffix(key, count), list(list_metrics.keys())
Expand Down

0 comments on commit 61e3415

Please sign in to comment.