Skip to content

Commit

Permalink
Update evaluations.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mmabrouk authored Feb 7, 2024
1 parent 2baa7d4 commit 09019ed
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions agenta-backend/agenta_backend/tasks/evaluations.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,18 +321,16 @@ async def aggregate_evaluator_results(
elif evaluator_key == "auto_regex_test":
result = aggregation_service.aggregate_binary(results)

elif evaluator_key not in ["auto_ai_critique", "auto_regex_test"]:
result = aggregation_service.aggregate_float(results)

elif evaluator_key not in [
elif evaluator_key in [
"auto_exact_match",
"auto_similarity_match",
"auto_regex_test",
"field_match_test",
"auto_webhook_test",
"auto_custom_code_run",
"auto_ai_critique",
]:
result = aggregation_service.aggregate_float(results)

else:
raise Exception(f"Evaluator {evaluator_key} aggregation does not exist")

evaluator_config = await fetch_evaluator_config(config_id)
Expand Down

0 comments on commit 09019ed

Please sign in to comment.