Skip to content

Commit da015c5

Browse files
committed
updated
1 parent 1e60a66 commit da015c5

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

eval_protocol/pytest/default_single_turn_rollout_process.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,20 +185,8 @@ async def process_row(row: EvaluationRow) -> EvaluationRow:
185185
if raw_output is None:
186186
raw_output = getattr(choice, "raw_output", None)
187187

188-
if raw_output is not None:
189-
# Convert to dict if it's a pydantic model or similar
190-
if hasattr(raw_output, "model_dump"):
191-
row.execution_metadata.raw_output = raw_output.model_dump()
192-
elif hasattr(raw_output, "dict"):
193-
row.execution_metadata.raw_output = raw_output.dict()
194-
elif isinstance(raw_output, dict):
195-
row.execution_metadata.raw_output = raw_output
196-
else:
197-
# Try to convert to dict via json
198-
try:
199-
row.execution_metadata.raw_output = json.loads(json.dumps(raw_output, default=str))
200-
except Exception:
201-
row.execution_metadata.raw_output = {"value": str(raw_output)}
188+
if raw_output is not None and isinstance(raw_output, dict):
189+
row.execution_metadata.raw_output = raw_output
202190

203191
usage = getattr(response, "usage", None)
204192
if usage:

0 commit comments

Comments
 (0)