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
1605ae12
Unverified
Commit
1605ae12
authored
Nov 25, 2024
by
Lianmin Zheng
Committed by
GitHub
Nov 25, 2024
Browse files
[CI] Minor fix for CI (#2187)
parent
1aea19f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
python/pyproject.toml
python/pyproject.toml
+2
-2
python/sglang/srt/managers/scheduler.py
python/sglang/srt/managers/scheduler.py
+3
-2
test/srt/run_suite.py
test/srt/run_suite.py
+1
-1
No files found.
python/pyproject.toml
View file @
1605ae12
...
...
@@ -17,12 +17,12 @@ dependencies = ["requests", "tqdm", "numpy", "IPython"]
[project.optional-dependencies]
runtime_common
=
[
"aiohttp"
,
"decord"
,
"fastapi"
,
"hf_transfer"
,
"huggingface_hub"
,
"interegular"
,
"hf_transfer"
,
"huggingface_hub"
,
"interegular"
,
"modelscope"
,
"orjson"
,
"outlines>=0.0.44,<0.1.0"
,
"packaging"
,
"pillow"
,
"prometheus-client>=0.20.0"
,
"psutil"
,
"pydantic"
,
"python-multipart"
,
"pyzmq>=25.1.2"
,
"torchao"
,
"uvicorn"
,
"uvloop"
,
"modelscope"
,
"xgrammar
=
=0.1.4"
]
"xgrammar
>
=0.1.4"
]
srt
=
["sglang[runtime_common]
", "
torch
", "
vllm>=
0.6.3
.post
1
"]
# HIP (Heterogeneous-computing Interface for Portability) for AMD
...
...
python/sglang/srt/managers/scheduler.py
View file @
1605ae12
...
...
@@ -526,7 +526,7 @@ class Scheduler:
recv_req
:
TokenizedGenerateReqInput
,
):
if
recv_req
.
session_id
is
None
or
recv_req
.
session_id
not
in
self
.
sessions
:
# C
heck if input_embeds is present and create dummy input_ids
# C
reate a new request
if
recv_req
.
input_embeds
is
not
None
:
# Generate fake input_ids based on the length of input_embeds
seq_length
=
len
(
recv_req
.
input_embeds
)
...
...
@@ -542,6 +542,7 @@ class Scheduler:
input_embeds
=
recv_req
.
input_embeds
,
)
req
.
tokenizer
=
self
.
tokenizer
if
recv_req
.
session_id
is
not
None
:
req
.
finished_reason
=
FINISH_ABORT
(
f
"Invalid request: session id
{
recv_req
.
session_id
}
does not exist"
...
...
@@ -549,7 +550,7 @@ class Scheduler:
self
.
waiting_queue
.
append
(
req
)
return
else
:
#
Handle
session
s
#
Create a new request from a previsou
session
session
=
self
.
sessions
[
recv_req
.
session_id
]
req
=
session
.
create_req
(
recv_req
,
self
.
tokenizer
)
if
isinstance
(
req
.
finished_reason
,
FINISH_ABORT
):
...
...
test/srt/run_suite.py
View file @
1605ae12
...
...
@@ -25,6 +25,7 @@ suites = {
"test_radix_attention.py"
,
"test_retract_decode.py"
,
"test_server_args.py"
,
"test_session_control.py"
,
"test_skip_tokenizer_init.py"
,
"test_srt_engine.py"
,
"test_srt_endpoint.py"
,
...
...
@@ -35,7 +36,6 @@ suites = {
"test_triton_attention_backend.py"
,
"test_update_weights.py"
,
"test_vision_openai_server.py"
,
"test_session_control.py"
,
],
"sampling/penaltylib"
:
glob
.
glob
(
"sampling/penaltylib/**/test_*.py"
,
recursive
=
True
...
...
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