Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions eval_protocol/pytest/remote_rollout_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,19 @@ async def _process_row(row: EvaluationRow) -> EvaluationRow:
# Fire-and-poll
def _post_init() -> None:
url = f"{remote_base_url}/init"
r = requests.post(url, json=init_payload.model_dump(), timeout=30)
r.raise_for_status()
try:
r = requests.post(url, json=init_payload.model_dump(), timeout=30)
r.raise_for_status()
except requests.exceptions.Timeout:
raise TimeoutError(
"The /init endpoint timed out after 30 seconds. "
"CRITICAL: The /init endpoint must return immediately (within 30s) and NOT block on rollout execution. "
"Your remote server should:\n"
"1. Accept the /init request and return a 200 response immediately\n"
"2. Process the actual rollout asynchronously in the background\n"
"3. Use the /status endpoint to report progress\n"
"For Python/Node.js: Start a separate process per rollout to avoid blocking the /init response."
)

await asyncio.to_thread(_post_init)

Expand Down
Loading