Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: Custom code evaluation aggregation #1347

Merged
merged 7 commits into from
Feb 7, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions agenta-backend/agenta_backend/tasks/evaluations.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,13 @@ async def aggregate_evaluator_results(
)

else:
# Handle boolean values for auto_regex_test and other evaluators
if all(isinstance(result.value, bool) for result in results):
if evaluator_key == "auto_regex_test" and all(
isinstance(result.value, bool) for result in results
):
average_value = sum(result.value for result in results) / len(
aybruhm marked this conversation as resolved.
Show resolved Hide resolved
results
)
elif evaluator_key not in ["auto_ai_critique", "auto_regex_test"]:
average_value = sum(result.value for result in results) / len(
results
)
Expand Down
Loading