Skip to content

Commit

Permalink
return list for single eval
Browse files Browse the repository at this point in the history
  • Loading branch information
dannylee1020 committed Dec 16, 2024
1 parent 1541bc4 commit 7293b2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openpo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def _get_model_consensus(
res_a: List[Dict],
res_b: List[Dict],
) -> List[int]:
# TODO: implement error handling to skip?
if len(res_a) != len(res_b):
raise ValueError(
"responses for evaluation do not have identical number of responses."
Expand Down Expand Up @@ -169,7 +170,7 @@ def eval_single(
result = res.content[0].input['"evaluation']
result = json.loads(res.choices[0].message.content)["evaluation"]

return {"evaluation": result}
return {"evaluation": [result]}
except (AuthenticationError, ValueError) as e:
raise e
except Exception as e:
Expand Down

0 comments on commit 7293b2b

Please sign in to comment.