From e3b3acfa6fff7e9c34a80e641260c92adccf1b22 Mon Sep 17 00:00:00 2001 From: Ata Fatahi Date: Thu, 12 Dec 2024 12:40:41 -0500 Subject: [PATCH] Rename rust folder to sgl-router (#2464) Signed-off-by: Ata Fatahi --- .github/CODEOWNERS | 2 +- .github/workflows/pr-test-rust.yml | 12 ++++++------ .github/workflows/release-pypi-router.yml | 10 +++++----- docs/router/router.md | 2 +- {rust => sgl-router}/Cargo.lock | 0 {rust => sgl-router}/Cargo.toml | 0 {rust => sgl-router}/MANIFEST.in | 0 {rust => sgl-router}/README.md | 0 .../py_src/sglang_router/__init__.py | 0 .../py_src/sglang_router/launch_router.py | 0 .../py_src/sglang_router/launch_server.py | 0 {rust => sgl-router}/py_src/sglang_router/router.py | 0 {rust => sgl-router}/py_src/sglang_router/version.py | 0 {rust => sgl-router}/py_test/run_suite.py | 0 {rust => sgl-router}/py_test/test_launch_router.py | 0 {rust => sgl-router}/py_test/test_launch_server.py | 0 {rust => sgl-router}/pyproject.toml | 0 {rust => sgl-router}/src/lib.rs | 0 {rust => sgl-router}/src/router.rs | 0 {rust => sgl-router}/src/server.rs | 0 {rust => sgl-router}/src/tree.rs | 0 {rust => sgl-router}/v0.1.0.md | 0 22 files changed, 13 insertions(+), 13 deletions(-) rename {rust => sgl-router}/Cargo.lock (100%) rename {rust => sgl-router}/Cargo.toml (100%) rename {rust => sgl-router}/MANIFEST.in (100%) rename {rust => sgl-router}/README.md (100%) rename {rust => sgl-router}/py_src/sglang_router/__init__.py (100%) rename {rust => sgl-router}/py_src/sglang_router/launch_router.py (100%) rename {rust => sgl-router}/py_src/sglang_router/launch_server.py (100%) rename {rust => sgl-router}/py_src/sglang_router/router.py (100%) rename {rust => sgl-router}/py_src/sglang_router/version.py (100%) rename {rust => sgl-router}/py_test/run_suite.py (100%) rename {rust => sgl-router}/py_test/test_launch_router.py (100%) rename {rust => sgl-router}/py_test/test_launch_server.py (100%) rename {rust => sgl-router}/pyproject.toml (100%) rename {rust => sgl-router}/src/lib.rs (100%) rename {rust => sgl-router}/src/router.rs (100%) rename {rust => sgl-router}/src/server.rs (100%) rename {rust => sgl-router}/src/tree.rs (100%) rename {rust => sgl-router}/v0.1.0.md (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 62612312f55..c78801897d5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,4 +11,4 @@ /python/sglang/srt/sampling @merrymercy @hnyls2002 /test/lang @merrymercy @Ying1123 @ByronHsu /test/srt @merrymercy @Ying1123 @zhyncs -/rust @ByronHsu @Ying1123 +/sglang-router @ByronHsu @Ying1123 diff --git a/.github/workflows/pr-test-rust.yml b/.github/workflows/pr-test-rust.yml index 5e5ecaf6427..9cfb5f6d961 100644 --- a/.github/workflows/pr-test-rust.yml +++ b/.github/workflows/pr-test-rust.yml @@ -4,11 +4,11 @@ on: push: branches: [ main ] paths: - - "rust/**" + - "sgl-router/**" pull_request: branches: [ main ] paths: - - "rust/**" + - "sgl-router/**" workflow_dispatch: concurrency: @@ -30,14 +30,14 @@ jobs: - name: Run fmt run: | source "$HOME/.cargo/env" - cd rust/ + cd sgl-router/ cargo fmt -- --check - name: Run test timeout-minutes: 20 run: | source "$HOME/.cargo/env" - cd rust/ + cd sgl-router/ cargo test e2e-rust: @@ -54,14 +54,14 @@ jobs: - name: Build python binding run: | source "$HOME/.cargo/env" - cd rust + cd sgl-router pip install setuptools-rust wheel build python3 -m build pip install --force-reinstall dist/*.whl - name: Run e2e test run: | bash scripts/killall_sglang.sh - cd rust/py_test + cd sgl-router/py_test python3 run_suite.py finish: diff --git a/.github/workflows/release-pypi-router.yml b/.github/workflows/release-pypi-router.yml index fbbb1f0243b..df20c211cb3 100644 --- a/.github/workflows/release-pypi-router.yml +++ b/.github/workflows/release-pypi-router.yml @@ -7,7 +7,7 @@ on: branches: - main paths: - - rust/pyproject.toml + - sglang-router/pyproject.toml workflow_dispatch: jobs: @@ -26,9 +26,9 @@ jobs: with: path: sglang-repo - - name: Move rust folder to root and delete sglang-repo + - name: Move sglang-router folder to root and delete sglang-repo run: | - mv sglang-repo/rust/* . + mv sglang-repo/sglang-router/* . rm -rf sglang-repo ls -alt @@ -69,9 +69,9 @@ jobs: with: path: sglang-repo - - name: Move rust folder to root, copy the license file, and delete sglang-repo + - name: Move sglang-router folder to root, copy the license file, and delete sglang-repo run: | - mv sglang-repo/rust/* . + mv sglang-repo/sglang-router/* . mv sglang-repo/LICENSE . rm -rf sglang-repo ls -alt diff --git a/docs/router/router.md b/docs/router/router.md index 695902c3a02..b5104926239 100644 --- a/docs/router/router.md +++ b/docs/router/router.md @@ -10,7 +10,7 @@ The router is a independent Python package, and it can be used as a drop-in repl $ pip install sglang-router ``` -Detailed usage of the router can be found in [launch_router](https://github.com/sgl-project/sglang/blob/main/rust/py_src/sglang_router/launch_router.py) and [launch_server](https://github.com/sgl-project/sglang/blob/main/rust/py_src/sglang/launch_server.py). Also, you can directly run the following command to see the usage of the router. +Detailed usage of the router can be found in [launch_router](https://github.com/sgl-project/sglang/blob/main/sgl-router/py_src/sglang_router/launch_router.py) and [launch_server](https://github.com/sgl-project/sglang/blob/main/sgl-router/py_src/sglang/launch_server.py). Also, you can directly run the following command to see the usage of the router. ```bash $ python -m sglang_router.launch_server --help diff --git a/rust/Cargo.lock b/sgl-router/Cargo.lock similarity index 100% rename from rust/Cargo.lock rename to sgl-router/Cargo.lock diff --git a/rust/Cargo.toml b/sgl-router/Cargo.toml similarity index 100% rename from rust/Cargo.toml rename to sgl-router/Cargo.toml diff --git a/rust/MANIFEST.in b/sgl-router/MANIFEST.in similarity index 100% rename from rust/MANIFEST.in rename to sgl-router/MANIFEST.in diff --git a/rust/README.md b/sgl-router/README.md similarity index 100% rename from rust/README.md rename to sgl-router/README.md diff --git a/rust/py_src/sglang_router/__init__.py b/sgl-router/py_src/sglang_router/__init__.py similarity index 100% rename from rust/py_src/sglang_router/__init__.py rename to sgl-router/py_src/sglang_router/__init__.py diff --git a/rust/py_src/sglang_router/launch_router.py b/sgl-router/py_src/sglang_router/launch_router.py similarity index 100% rename from rust/py_src/sglang_router/launch_router.py rename to sgl-router/py_src/sglang_router/launch_router.py diff --git a/rust/py_src/sglang_router/launch_server.py b/sgl-router/py_src/sglang_router/launch_server.py similarity index 100% rename from rust/py_src/sglang_router/launch_server.py rename to sgl-router/py_src/sglang_router/launch_server.py diff --git a/rust/py_src/sglang_router/router.py b/sgl-router/py_src/sglang_router/router.py similarity index 100% rename from rust/py_src/sglang_router/router.py rename to sgl-router/py_src/sglang_router/router.py diff --git a/rust/py_src/sglang_router/version.py b/sgl-router/py_src/sglang_router/version.py similarity index 100% rename from rust/py_src/sglang_router/version.py rename to sgl-router/py_src/sglang_router/version.py diff --git a/rust/py_test/run_suite.py b/sgl-router/py_test/run_suite.py similarity index 100% rename from rust/py_test/run_suite.py rename to sgl-router/py_test/run_suite.py diff --git a/rust/py_test/test_launch_router.py b/sgl-router/py_test/test_launch_router.py similarity index 100% rename from rust/py_test/test_launch_router.py rename to sgl-router/py_test/test_launch_router.py diff --git a/rust/py_test/test_launch_server.py b/sgl-router/py_test/test_launch_server.py similarity index 100% rename from rust/py_test/test_launch_server.py rename to sgl-router/py_test/test_launch_server.py diff --git a/rust/pyproject.toml b/sgl-router/pyproject.toml similarity index 100% rename from rust/pyproject.toml rename to sgl-router/pyproject.toml diff --git a/rust/src/lib.rs b/sgl-router/src/lib.rs similarity index 100% rename from rust/src/lib.rs rename to sgl-router/src/lib.rs diff --git a/rust/src/router.rs b/sgl-router/src/router.rs similarity index 100% rename from rust/src/router.rs rename to sgl-router/src/router.rs diff --git a/rust/src/server.rs b/sgl-router/src/server.rs similarity index 100% rename from rust/src/server.rs rename to sgl-router/src/server.rs diff --git a/rust/src/tree.rs b/sgl-router/src/tree.rs similarity index 100% rename from rust/src/tree.rs rename to sgl-router/src/tree.rs diff --git a/rust/v0.1.0.md b/sgl-router/v0.1.0.md similarity index 100% rename from rust/v0.1.0.md rename to sgl-router/v0.1.0.md