Skip to content

Commit 088cad0

Browse files
committed
fix: minor, idle unload distinguish sleep time and timeout
Signed-off-by: Raphael Glon <[email protected]>
1 parent bb1eded commit 088cad0

File tree

1 file changed

+2
-1
lines changed
  • src/huggingface_inference_toolkit

1 file changed

+2
-1
lines changed

src/huggingface_inference_toolkit/idle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ async def live_check_loop():
2121
pid = os.getpid()
2222

2323
LOG.debug("Starting live check loop")
24+
sleep_time = max(int(IDLE_TIMEOUT // 5), 1)
2425

2526
while True:
26-
await asyncio.sleep(IDLE_TIMEOUT)
27+
await asyncio.sleep(sleep_time)
2728
LOG.debug("Checking whether we should unload anything from gpu")
2829

2930
last_start = LAST_START

0 commit comments

Comments
 (0)