File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -121,8 +121,19 @@ async def _process_row(row: EvaluationRow) -> EvaluationRow:
121121 # Fire-and-poll
122122 def _post_init () -> None :
123123 url = f"{ remote_base_url } /init"
124- r = requests .post (url , json = init_payload .model_dump (), timeout = 30 )
125- r .raise_for_status ()
124+ try :
125+ r = requests .post (url , json = init_payload .model_dump (), timeout = 30 )
126+ r .raise_for_status ()
127+ except requests .exceptions .Timeout :
128+ raise TimeoutError (
129+ "The /init endpoint timed out after 30 seconds. "
130+ "CRITICAL: The /init endpoint must return immediately (within 30s) and NOT block on rollout execution. "
131+ "Your remote server should:\n "
132+ "1. Accept the /init request and return a 200 response immediately\n "
133+ "2. Process the actual rollout asynchronously in the background\n "
134+ "3. Use the /status endpoint to report progress\n "
135+ "For Python/Node.js: Start a separate process per rollout to avoid blocking the /init response."
136+ )
126137
127138 await asyncio .to_thread (_post_init )
128139
You can’t perform that action at this time.
0 commit comments