File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed
Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -169,21 +169,14 @@ async def _execute_with_semaphore(idx):
169169 max_tool_calls = getattr (policy , "max_tools_per_turn" , None ),
170170 )
171171 if trajectory .terminated :
172- if trajectory .termination_reason in {
173- TerminationReason .CONTROL_PLANE_SIGNAL ,
174- TerminationReason .USER_STOP ,
175- }:
176- evaluation_rows [idx ].rollout_status .status = "finished"
177- elif trajectory .termination_reason in {TerminationReason .MAX_STEPS , TerminationReason .INTERRUPTED }:
178- evaluation_rows [idx ].rollout_status .status = "stopped"
179- evaluation_rows [idx ].rollout_status .error_message = trajectory .control_plane_summary .get (
180- "termination_reason" , trajectory .termination_reason
181- )
182- else :
172+ if trajectory .termination_reason == TerminationReason .ERROR :
183173 evaluation_rows [idx ].rollout_status .status = "error"
184- evaluation_rows [idx ].rollout_status .error_message = trajectory .control_plane_summary .get (
174+ evaluation_rows [idx ].rollout_status .reason = trajectory .control_plane_summary .get (
185175 "error_message" , None
186176 )
177+ else :
178+ evaluation_rows [idx ].rollout_status .status = "finished"
179+ evaluation_rows [idx ].rollout_status .reason = trajectory .termination_reason
187180 else :
188181 evaluation_rows [idx ].rollout_status .status = "running"
189182
Original file line number Diff line number Diff line change @@ -229,10 +229,10 @@ class RolloutStatus(BaseModel):
229229 error: Rollout failed.
230230 stopped: Rollout terminated unexpectedly (e.g. max step, control plane signal, user stop).
231231 """
232- status : Literal ["running" , "finished" , "error" , "stopped" ] = Field (
233- "finished " , description = "Status of the rollout."
232+ status : Literal ["running" , "finished" , "error" ] = Field (
233+ "running " , description = "Status of the rollout."
234234 )
235- error_message : Optional [str ] = Field (None , description = "Error message if the rollout failed. " )
235+ reason : Optional [str ] = Field ("" , description = "reason of the rollout status, mapped to values in TerminationReason " )
236236
237237
238238class EvaluationRow (BaseModel ):
You can’t perform that action at this time.
0 commit comments