← back to Exo
pr fixes
913fdcc661f7e7a9228d30c58c64c04a5e38148a · 2024-11-21 05:04:38 -0800 · josh
Files touched
M exo/api/chatgpt_api.pyM exo/helpers.pyM exo/inference/mlx/sharded_utils.pyM setup.py
Diff
commit 913fdcc661f7e7a9228d30c58c64c04a5e38148a
Author: josh <eyasufikru567@gmail.com>
Date: Thu Nov 21 05:04:38 2024 -0800
pr fixes
---
exo/api/chatgpt_api.py | 2 +-
exo/helpers.py | 4 ++--
exo/inference/mlx/sharded_utils.py | 2 +-
setup.py | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/exo/api/chatgpt_api.py b/exo/api/chatgpt_api.py
index 12244e6d..7def1a41 100644
--- a/exo/api/chatgpt_api.py
+++ b/exo/api/chatgpt_api.py
@@ -189,7 +189,7 @@ class ChatGPTAPI:
response = web.json_response({"detail": "Quit signal received"}, status=200)
await response.prepare(request)
await response.write_eof()
- await shutdown(signal.SIGINT, asyncio.get_event_loop(), self.node)
+ await shutdown(signal.SIGINT, asyncio.get_event_loop(), self.node.server)
async def timeout_middleware(self, app, handler):
async def middleware(request):
diff --git a/exo/helpers.py b/exo/helpers.py
index 44fb983c..1bba9cd9 100644
--- a/exo/helpers.py
+++ b/exo/helpers.py
@@ -237,7 +237,7 @@ def get_all_ip_addresses():
return ["localhost"]
-async def shutdown(signal, loop, node):
+async def shutdown(signal, loop, server):
"""Gracefully shutdown the server and close the asyncio loop."""
print(f"Received exit signal {signal.name}...")
print("Thank you for using exo.")
@@ -246,7 +246,7 @@ async def shutdown(signal, loop, node):
[task.cancel() for task in server_tasks]
print(f"Cancelling {len(server_tasks)} outstanding tasks")
await asyncio.gather(*server_tasks, return_exceptions=True)
- await node.server.stop()
+ await server.stop()
def is_frozen():
diff --git a/exo/inference/mlx/sharded_utils.py b/exo/inference/mlx/sharded_utils.py
index 8c59e2d4..9818bb25 100644
--- a/exo/inference/mlx/sharded_utils.py
+++ b/exo/inference/mlx/sharded_utils.py
@@ -184,7 +184,7 @@ async def load_shard(
processor.encode = processor.tokenizer.encode
return model, processor
else:
- tokenizer = load_tokenizer(model_path, tokenizer_config)
+ tokenizer = await resolve_tokenizer(model_path)
return model, tokenizer
diff --git a/setup.py b/setup.py
index daa4a4ae..eb0053f5 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ install_requires = [
"Jinja2==3.1.4",
"netifaces==0.11.0",
"numpy==2.0.0",
- "nuitka==2.4.10",
+ "nuitka==2.4.11",
"nvidia-ml-py==12.560.30",
"pillow==10.4.0",
"prometheus-client==0.20.0",
← 400e428a fix
·
back to Exo
·
pr fixes be6e9ae6 →