Skip to content

Commit 3bcbada

Browse files
author
Dylan Huang
committed
fix
1 parent f89cbb0 commit 3bcbada

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

eval_protocol/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Code(int, Enum):
122122
UNAUTHENTICATED = 16
123123

124124
# Custom codes for rollout states (using higher numbers to avoid conflicts)
125-
FINISHED = 100 # Custom code for rollout finished
125+
FINISHED = 100
126126

127127
@classmethod
128128
def rollout_running(cls) -> "Status":

eval_protocol/pytest/utils.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ async def execute_row_with_backoff(task: asyncio.Task, row: EvaluationRow) -> Ev
282282
try:
283283
# Try original task first
284284
result = await task
285-
result.rollout_status.status = RolloutStatus.Status.FINISHED
285+
result.rollout_status = Status.rollout_finished()
286286
return result
287287
except Exception as e:
288288
# NOTE: we perform these checks because we don't put the backoff decorator on initial batch call. we don't want to retry whole batch if anything fails.
@@ -295,17 +295,15 @@ async def execute_row_with_backoff(task: asyncio.Task, row: EvaluationRow) -> Ev
295295
# Use shared backoff function for retryable exceptions
296296
try:
297297
result = await execute_row_with_backoff_retry(row)
298-
result.rollout_status.status = RolloutStatus.Status.FINISHED
298+
result.rollout_status = Status.rollout_finished()
299299
return result
300300
except Exception as retry_error:
301301
# Backoff gave up
302-
row.rollout_status.status = RolloutStatus.Status.ERROR
303-
# row.rollout_status.termination_reason = str(retry_error)
302+
row.rollout_status = Status.rollout_error(str(retry_error))
304303
return row
305304
else:
306305
# Non-retryable exception - fail immediately
307-
row.rollout_status.status = RolloutStatus.Status.ERROR
308-
# row.rollout_status.termination_reason = str(e)
306+
row.rollout_status = Status.rollout_error(str(e))
309307
return row
310308

311309
# Process all tasks concurrently with backoff retry

0 commit comments

Comments
 (0)