Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
32293a29
"vscode:/vscode.git/clone" did not exist on "9545bfb28a6371dcc4aeff4678b38ea0d9ae4693"
Unverified
Commit
32293a29
authored
Nov 23, 2024
by
Byron Hsu
Committed by
GitHub
Nov 23, 2024
Browse files
Improve sglang router (#2148)
parent
79216908
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
.github/workflows/release-pypi-router.yml
.github/workflows/release-pypi-router.yml
+5
-0
rust/py_src/sglang_router/launch_server.py
rust/py_src/sglang_router/launch_server.py
+3
-2
rust/pyproject.toml
rust/pyproject.toml
+1
-1
No files found.
.github/workflows/release-pypi-router.yml
View file @
32293a29
...
...
@@ -3,6 +3,11 @@
name
:
Release SGLang Router to PyPI
on
:
push
:
branches
:
-
main
paths
:
-
rust/pyproject.toml"
workflow_dispatch
:
jobs
:
...
...
rust/py_src/sglang_router/launch_server.py
View file @
32293a29
...
...
@@ -2,6 +2,7 @@ import argparse
import
copy
import
multiprocessing
as
mp
import
os
import
random
import
signal
import
sys
import
time
...
...
@@ -11,7 +12,7 @@ import requests
from
sglang_router.launch_router
import
RouterArgs
,
launch_router
from
sglang.srt.server
import
launch_server
from
sglang.srt.server_args
import
ServerArgs
,
prepare_server_args
from
sglang.srt.server_args
import
ServerArgs
from
sglang.srt.utils
import
is_port_available
from
sglang.utils
import
get_exception_traceback
...
...
@@ -94,7 +95,7 @@ def find_available_ports(base_port: int, count: int) -> List[int]:
while
len
(
available_ports
)
<
count
:
if
is_port_available
(
current_port
):
available_ports
.
append
(
current_port
)
current_port
+=
1
current_port
+=
random
.
randint
(
100
,
1000
)
return
available_ports
...
...
rust/pyproject.toml
View file @
32293a29
...
...
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name
=
"sglang-router"
version
=
"0.0.
6
"
version
=
"0.0.
7
"
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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment