From 86c37d010aeabb1bd2f4a05e19b6bb7f14c3d8da Mon Sep 17 00:00:00 2001 From: Byron Hsu Date: Mon, 11 Nov 2024 15:20:14 -0800 Subject: [PATCH] fix sglang_router not found (#2005) --- rust/demo.py | 4 +--- rust/py_src/{ => sglang_router}/__init__.py | 2 +- rust/py_src/{ => sglang_router}/router.py | 0 rust/pyproject.toml | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) rename rust/py_src/{ => sglang_router}/__init__.py (100%) rename rust/py_src/{ => sglang_router}/router.py (100%) diff --git a/rust/demo.py b/rust/demo.py index 6de3f8c88..6d83580d2 100644 --- a/rust/demo.py +++ b/rust/demo.py @@ -4,9 +4,7 @@ router = Router( worker_urls=[ "http://localhost:30000", "http://localhost:30001", - ], - policy=PolicyType.ApproxTree, - tokenizer_path="/shared/public/elr-models/meta-llama/Meta-Llama-3.1-8B-Instruct/07eb05b21d191a58c577b4a45982fe0c049d0693/tokenizer.json", + ] ) router.start() diff --git a/rust/py_src/__init__.py b/rust/py_src/sglang_router/__init__.py similarity index 100% rename from rust/py_src/__init__.py rename to rust/py_src/sglang_router/__init__.py index 1bb51e264..ec41b5d0c 100644 --- a/rust/py_src/__init__.py +++ b/rust/py_src/sglang_router/__init__.py @@ -1,5 +1,5 @@ # a lightweihgt wrapper on router with argument type and comments -# no wrapper on policy type => direct export from sglang_router_rs import PolicyType +# no wrapper on policy type => direct export from .router import Router diff --git a/rust/py_src/router.py b/rust/py_src/sglang_router/router.py similarity index 100% rename from rust/py_src/router.py rename to rust/py_src/sglang_router/router.py diff --git a/rust/pyproject.toml b/rust/pyproject.toml index 3161a158b..f5f6656ef 100644 --- a/rust/pyproject.toml +++ b/rust/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "sglang-router" -version = "0.0.3" +version = "0.0.4" description = "SGLang router is a standalone module implemented in Rust to achieve data parallelism across SGLang instances." authors = [{name = "Byron Hsu", email = "byronhsu1230@gmail.com"}] requires-python = ">=3.8"