From c6c2855c80e6cf6ebd55602f6fe43d80aaca7fae Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 27 Apr 2025 21:22:21 -0700 Subject: [PATCH] llama.cpp: Remove the timeout while loading models (closes #6907) --- modules/llama_cpp_server.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/llama_cpp_server.py b/modules/llama_cpp_server.py index 9572d5aa..4b01c228 100644 --- a/modules/llama_cpp_server.py +++ b/modules/llama_cpp_server.py @@ -340,9 +340,7 @@ class LlamaServer: # Wait for server to be healthy health_url = f"http://127.0.0.1:{self.port}/health" - start_time = time.time() - timeout = 3600 * 8 # 8 hours - while time.time() - start_time < timeout: + while True: # Check if process is still alive if self.process.poll() is not None: # Process has terminated @@ -357,8 +355,6 @@ class LlamaServer: pass time.sleep(1) - else: - raise TimeoutError(f"Server health check timed out after {timeout} seconds") # Server is now healthy, get model info self._get_vocabulary_size()