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 500 error in non-match testset vs variant input names #1000

Merged
merged 4 commits into from
Dec 5, 2023
Merged
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
4 changes: 2 additions & 2 deletions agenta-backend/agenta_backend/services/evaluation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async def prepare_csvdata_and_create_evaluation_scenario(

Args:
csvdata: A list of dictionaries representing the CSV data.
inputs: A list of strings representing the names of the inputs in the variant.
payload_inputs: A list of strings representing the names of the inputs in the variant.
evaluation_type: The type of evaluation
new_evaluation: The instance of EvaluationDB
user: The owner of the evaluation scenario
Expand All @@ -208,7 +208,7 @@ async def prepare_csvdata_and_create_evaluation_scenario(
await engine.delete(new_evaluation)
msg = f"""
Columns in the test set should match the names of the inputs in the variant.
Inputs names in variant are: {inputs} while
Inputs names in variant are: {[variant_input for variant_input in payload_inputs]} while
columns in test set are: {[col for col in datum.keys() if col != 'correct_answer']}
"""
raise HTTPException(
Expand Down
Loading