Skip to content

Commit 1bc8f9a

Browse files
WIP - Minor fixes
1 parent 55cf718 commit 1bc8f9a

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

src/guidellm/scheduler/scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def _is_max_error_rate_reached(self, run_info: SchedulerRunInfo) -> bool:
218218
if run_info.max_error_rate is None:
219219
return False
220220
current_error_rate = run_info.errored_requests / run_info.end_number
221-
logger.info(
221+
logger.debug(
222222
f"Current error rate {current_error_rate} "
223223
f"i.e total_finished [success / error] / max total possible"
224224
)

src/guidellm/scheduler/worker.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,7 @@ def _get_queue_intermittently():
145145
if shutdown_event.is_set():
146146
logger.info(f"Shutdown signal received in future {process_id}")
147147
raise asyncio.CancelledError()
148-
# return None
149-
150-
try:
151-
return await asyncio.to_thread(_get_queue_intermittently) # type: ignore[attr-defined]
152-
except asyncio.CancelledError:
153-
logger.info("kaki")
154-
# return None
155-
raise
156-
# raise
148+
return await asyncio.to_thread(_get_queue_intermittently) # type: ignore[attr-defined]
157149

158150
async def send_result(
159151
self,
@@ -305,9 +297,10 @@ async def _wait_for_shutdown(
305297
while not shutdown_event.is_set():
306298
await asyncio.sleep(shutdown_poll_interval)
307299

308-
logger.debug("Shutdown signal received")
300+
# Raising asyncio.CancelledError instead would
301+
# cause the asyncio.wait above to wait
302+
# forever, couldn't find a reasonable reason why
309303
raise ShutdownSignalReceived("Shutdown event set, cancelling process loop.")
310-
# raise asyncio.CancelledError("Shutdown event set, cancelling process loop.")
311304

312305
async def _process_synchronous_requests_loop(
313306
self,
@@ -352,7 +345,6 @@ async def _process_asynchronous_requests_loop(
352345
raise ValueError("Async worker called with max_concurrency < 1")
353346

354347
while True:
355-
logger.info("Awaiting request...")
356348
process_request = await self.get_request(
357349
requests_queue=requests_queue,
358350
shutdown_event=shutdown_event,

0 commit comments

Comments
 (0)