llama.cpp: Remove the timeout while loading models (closes #6907)

This commit is contained in:
oobabooga 2025-04-27 21:22:21 -07:00
parent bbcaec75b4
commit c6c2855c80

View file

@ -340,9 +340,7 @@ class LlamaServer:
# Wait for server to be healthy # Wait for server to be healthy
health_url = f"http://127.0.0.1:{self.port}/health" health_url = f"http://127.0.0.1:{self.port}/health"
start_time = time.time() while True:
timeout = 3600 * 8 # 8 hours
while time.time() - start_time < timeout:
# Check if process is still alive # Check if process is still alive
if self.process.poll() is not None: if self.process.poll() is not None:
# Process has terminated # Process has terminated
@ -357,8 +355,6 @@ class LlamaServer:
pass pass
time.sleep(1) time.sleep(1)
else:
raise TimeoutError(f"Server health check timed out after {timeout} seconds")
# Server is now healthy, get model info # Server is now healthy, get model info
self._get_vocabulary_size() self._get_vocabulary_size()