Skip to content

Commit 027cd6a

Browse files
author
Dylan Huang
committed
Improve error handling in RemoteRolloutProcessor by raising exceptions for non-404 errors during polling, ensuring better visibility into issues while continuing to handle 404 errors gracefully.
1 parent 1d681bf commit 027cd6a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

eval_protocol/pytest/remote_rollout_processor.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,15 @@ def _get_status() -> Dict[str, Any]:
194194
terminated = bool(status.get("terminated", False))
195195
if terminated:
196196
break
197+
except requests.exceptions.HTTPError as e:
198+
if e.response is not None and e.response.status_code == 404:
199+
# Only pass on 404 errors; continue polling
200+
pass
201+
else:
202+
raise
197203
except Exception:
198-
# transient errors; continue polling
199-
pass
204+
# For all other exceptions, raise them
205+
raise
200206

201207
await asyncio.sleep(poll_interval)
202208
else:

0 commit comments

Comments
 (0)