Skip to content

Commit

Permalink
revert formatting change
Browse files Browse the repository at this point in the history
  • Loading branch information
clementou committed Mar 4, 2024
1 parent 8a43585 commit fa7fc0e
Showing 1 changed file with 17 additions and 27 deletions.
44 changes: 17 additions & 27 deletions sotopia/envs/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,34 +427,24 @@ def unweighted_aggregate_evaluate(
):
log.debug(f"[green] The conversation is terminated. {response}")
return ScriptEnvironmentResponse(
terminated=(
environment_responses[0]["terminated"]
if "terminated" in environment_responses[0]
else False
),
terminated=environment_responses[0]["terminated"]
if "terminated" in environment_responses[0]
else False,
p1_rate=(
(
(
agent_1_responses[0]["overall_score"]
if "overall_score" in agent_1_responses[0]
else 0
),
agent_1_responses[0],
)
if agent_1_responses != ({}, "")
else None
),
agent_1_responses[0]["overall_score"]
if "overall_score" in agent_1_responses[0]
else 0,
agent_1_responses[0],
)
if agent_1_responses != ({}, "")
else None,
p2_rate=(
(
(
agent_2_responses[0]["overall_score"]
if "overall_score" in agent_2_responses[0]
else 0
),
agent_2_responses[0],
)
if agent_2_responses != ({}, "")
else None
),
agent_2_responses[0]["overall_score"]
if "overall_score" in agent_2_responses[0]
else 0,
agent_2_responses[0],
)
if agent_2_responses != ({}, "")
else None,
comments=comments,
)

0 comments on commit fa7fc0e

Please sign in to comment.