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
06008bc2
"src/rpc/vscode:/vscode.git/clone" did not exist on "9d7bf4ea894aa9abcf285163b9586f1ffe5deff3"
Unverified
Commit
06008bc2
authored
Feb 12, 2024
by
Lianmin Zheng
Committed by
GitHub
Feb 12, 2024
Browse files
Fix server launch for jupyter notebook (#186)
parent
bb824da4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
38 deletions
+42
-38
python/sglang/srt/server.py
python/sglang/srt/server.py
+42
-38
No files found.
python/sglang/srt/server.py
View file @
06008bc2
...
@@ -464,7 +464,6 @@ def launch_server(server_args, pipe_finish_writer):
...
@@ -464,7 +464,6 @@ def launch_server(server_args, pipe_finish_writer):
assert
proc_router
.
is_alive
()
and
proc_detoken
.
is_alive
()
assert
proc_router
.
is_alive
()
and
proc_detoken
.
is_alive
()
def
_launch_server
():
def
_launch_server
():
# Launch api server
uvicorn
.
run
(
uvicorn
.
run
(
app
,
app
,
host
=
server_args
.
host
,
host
=
server_args
.
host
,
...
@@ -474,9 +473,7 @@ def launch_server(server_args, pipe_finish_writer):
...
@@ -474,9 +473,7 @@ def launch_server(server_args, pipe_finish_writer):
loop
=
"uvloop"
,
loop
=
"uvloop"
,
)
)
t
=
threading
.
Thread
(
target
=
_launch_server
)
def
_wait_and_warmup
():
t
.
start
()
url
=
server_args
.
url
()
url
=
server_args
.
url
()
for
_
in
range
(
60
):
for
_
in
range
(
60
):
time
.
sleep
(
1
)
time
.
sleep
(
1
)
...
@@ -518,6 +515,13 @@ def launch_server(server_args, pipe_finish_writer):
...
@@ -518,6 +515,13 @@ def launch_server(server_args, pipe_finish_writer):
if
pipe_finish_writer
is
not
None
:
if
pipe_finish_writer
is
not
None
:
pipe_finish_writer
.
send
(
"init ok"
)
pipe_finish_writer
.
send
(
"init ok"
)
t
=
threading
.
Thread
(
target
=
_wait_and_warmup
)
t
.
start
()
try
:
_launch_server
()
finally
:
t
.
join
()
class
Runtime
:
class
Runtime
:
def
__init__
(
def
__init__
(
...
...
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