File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -669,6 +669,10 @@ async def timeout_task():
669
669
except asyncio .CancelledError :
670
670
logger .info ("Got cancellation request for VLLM server" )
671
671
proc .terminate ()
672
+ try :
673
+ await asyncio .wait_for (proc .wait (), timeout = 10.0 )
674
+ except asyncio .TimeoutError :
675
+ logger .warning ("VLLM server did not terminate within 10 seconds" )
672
676
raise
673
677
674
678
timeout_task .cancel ()
@@ -1209,6 +1213,9 @@ async def main():
1209
1213
vllm_server .cancel ()
1210
1214
metrics_task .cancel ()
1211
1215
1216
+ # Wait for cancelled tasks to complete
1217
+ await asyncio .gather (vllm_server , metrics_task , return_exceptions = True )
1218
+
1212
1219
# Output final metrics summary
1213
1220
metrics_summary = metrics .get_metrics_summary ()
1214
1221
logger .info ("=" * 80 )
@@ -1233,7 +1240,8 @@ async def main():
1233
1240
)
1234
1241
1235
1242
# Output finished_on_attempt statistics
1236
- logger .info ("\n Pages finished by attempt number:" )
1243
+ logger .info ("" )
1244
+ logger .info ("Pages finished by attempt number:" )
1237
1245
total_finished = sum (total_metrics .get (f"finished_on_attempt_{ i } " , 0 ) for i in range (args .max_page_retries ))
1238
1246
cumulative = 0
1239
1247
You can’t perform that action at this time.
0 commit comments