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

Fix issue where Evaluation Results don't load when individual Evaluation Scenarios fail #1844

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 8 additions & 4 deletions agenta-backend/agenta_backend/models/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,14 @@ def evaluation_scenario_db_to_pydantic(
EvaluationScenarioOutput(**scenario_output.dict())
for scenario_output in evaluation_scenario_db.outputs
],
correct_answers=[
CorrectAnswer(**correct_answer.dict())
for correct_answer in evaluation_scenario_db.correct_answers
],
correct_answers=(
[
CorrectAnswer(**correct_answer.dict())
for correct_answer in evaluation_scenario_db.correct_answers
]
if evaluation_scenario_db.correct_answers is not None
else None
),
is_pinned=evaluation_scenario_db.is_pinned or False,
note=evaluation_scenario_db.note or "",
results=evaluation_scenarios_results_to_pydantic(
Expand Down
2 changes: 2 additions & 0 deletions agenta-backend/agenta_backend/routers/evaluation_router.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import secrets
import logging
import traceback
from typing import Any, List

from fastapi.responses import JSONResponse
Expand Down Expand Up @@ -270,6 +271,7 @@ async def fetch_evaluation_scenarios(
return eval_scenarios

except Exception as exc:
logger.error(str(traceback.format_exc()))
raise HTTPException(status_code=500, detail=str(exc))


Expand Down
Loading