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
c03cece4
Unverified
Commit
c03cece4
authored
Sep 11, 2024
by
Lianmin Zheng
Committed by
GitHub
Sep 11, 2024
Browse files
Improve error reporting during server launch (#1390)
parent
15c75e41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
python/sglang/srt/server.py
python/sglang/srt/server.py
+4
-3
No files found.
python/sglang/srt/server.py
View file @
c03cece4
...
...
@@ -447,13 +447,12 @@ def _wait_and_warmup(server_args, pipe_finish_writer, pid):
time
.
sleep
(
1
)
try
:
res
=
requests
.
get
(
url
+
"/get_model_info"
,
timeout
=
5
,
headers
=
headers
)
assert
res
.
status_code
==
200
,
f
"
{
res
}
"
assert
res
.
status_code
==
200
,
f
"
{
res
=
}
,
{
res
.
text
=
}
"
success
=
True
break
except
(
AssertionError
,
requests
.
exceptions
.
RequestException
)
as
e
:
except
(
AssertionError
,
requests
.
exceptions
.
RequestException
):
last_traceback
=
get_exception_traceback
()
pass
model_info
=
res
.
json
()
if
not
success
:
if
pipe_finish_writer
is
not
None
:
...
...
@@ -462,6 +461,8 @@ def _wait_and_warmup(server_args, pipe_finish_writer, pid):
kill_child_process
(
pid
,
including_parent
=
False
)
return
model_info
=
res
.
json
()
# Send a warmup request
request_name
=
"/generate"
if
model_info
[
"is_generation"
]
else
"/encode"
max_new_tokens
=
8
if
model_info
[
"is_generation"
]
else
1
...
...
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