Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve sglang router #2148

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/release-pypi-router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
name: Release SGLang Router to PyPI

on:
push:
branches:
- main
paths:
- rust/pyproject.toml"
workflow_dispatch:

jobs:
Expand Down
5 changes: 3 additions & 2 deletions rust/py_src/sglang_router/launch_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import copy
import multiprocessing as mp
import os
import random
import signal
import sys
import time
Expand All @@ -11,7 +12,7 @@
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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion rust/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading