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
632d506d
Unverified
Commit
632d506d
authored
Aug 25, 2024
by
Liangsheng Yin
Committed by
GitHub
Aug 26, 2024
Browse files
minor: improve CI and dependencies (#1212)
parent
3579162a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
13 deletions
+10
-13
.github/workflows/unit-test.yml
.github/workflows/unit-test.yml
+1
-3
python/pyproject.toml
python/pyproject.toml
+1
-1
python/sglang/srt/managers/tokenizer_manager.py
python/sglang/srt/managers/tokenizer_manager.py
+3
-5
python/sglang/test/test_utils.py
python/sglang/test/test_utils.py
+5
-4
No files found.
.github/workflows/unit-test.yml
View file @
632d506d
...
@@ -29,10 +29,8 @@ jobs:
...
@@ -29,10 +29,8 @@ jobs:
-
name
:
Install dependencies
-
name
:
Install dependencies
run
:
|
run
:
|
pip install --upgrade pip
pip install --upgrade pip
pip install -e "python[
all
]"
pip install -e "python[
dev
]"
pip install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.4/ --force-reinstall
pip install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.4/ --force-reinstall
pip install accelerate
pip install sentence_transformers
-
name
:
Test Backend Runtime
-
name
:
Test Backend Runtime
timeout-minutes
:
20
timeout-minutes
:
20
...
...
python/pyproject.toml
View file @
632d506d
...
@@ -27,7 +27,7 @@ srt = ["aiohttp", "decord", "fastapi", "hf_transfer", "huggingface_hub", "intere
...
@@ -27,7 +27,7 @@ srt = ["aiohttp", "decord", "fastapi", "hf_transfer", "huggingface_hub", "intere
openai
=
[
"openai>=1.0"
,
"tiktoken"
]
openai
=
[
"openai>=1.0"
,
"tiktoken"
]
anthropic
=
["anthropic>=0.20.0"]
anthropic
=
["anthropic>=0.20.0"]
litellm
=
["litellm>=1.0.0"]
litellm
=
["litellm>=1.0.0"]
test
=
[
"jsonlines"
,
"matplotlib"
,
"pandas"
]
test
=
[
"jsonlines"
,
"matplotlib"
,
"pandas"
,
"sentence_transformers"
,
"accelerate"
]
all
=
["sglang[srt]
", "
sglang
[openai]
", "
sglang
[anthropic]
", "
sglang
[litellm]"]
all
=
["sglang[srt]
", "
sglang
[openai]
", "
sglang
[anthropic]
", "
sglang
[litellm]"]
dev
=
["sglang[all]
", "
sglang
[test]"]
dev
=
["sglang[all]
", "
sglang
[test]"]
...
...
python/sglang/srt/managers/tokenizer_manager.py
View file @
632d506d
...
@@ -427,12 +427,10 @@ class TokenizerManager:
...
@@ -427,12 +427,10 @@ class TokenizerManager:
return
sampling_params
return
sampling_params
async
def
_get_pixel_values
(
self
,
image_data
):
async
def
_get_pixel_values
(
self
,
image_data
):
if
isinstance
(
image_data
,
list
)
and
len
(
image_data
)
>
0
:
if
image_data
is
None
:
return
await
self
.
_get_pixel_values_internal
(
image_data
)
elif
isinstance
(
image_data
,
str
):
return
await
self
.
_get_pixel_values_internal
(
image_data
)
else
:
return
None
,
None
,
None
return
None
,
None
,
None
else
:
return
await
self
.
_get_pixel_values_internal
(
image_data
)
async
def
_wait_for_response
(
async
def
_wait_for_response
(
self
,
self
,
...
...
python/sglang/test/test_utils.py
View file @
632d506d
...
@@ -465,7 +465,7 @@ def run_unittest_files(files: List[str], timeout_per_file: float):
...
@@ -465,7 +465,7 @@ def run_unittest_files(files: List[str], timeout_per_file: float):
def
run_one_file
(
filename
):
def
run_one_file
(
filename
):
filename
=
os
.
path
.
join
(
os
.
getcwd
(),
filename
)
filename
=
os
.
path
.
join
(
os
.
getcwd
(),
filename
)
print
(
f
"
\n\n
Run
{
filename
}
\n\n
"
)
print
(
f
"
\n\n
Run
{
filename
}
\n\n
"
,
flush
=
True
)
process
=
subprocess
.
Popen
(
process
=
subprocess
.
Popen
(
[
"python3"
,
filename
],
stdout
=
None
,
stderr
=
None
,
env
=
os
.
environ
[
"python3"
,
filename
],
stdout
=
None
,
stderr
=
None
,
env
=
os
.
environ
)
)
...
@@ -481,15 +481,16 @@ def run_unittest_files(files: List[str], timeout_per_file: float):
...
@@ -481,15 +481,16 @@ def run_unittest_files(files: List[str], timeout_per_file: float):
kill_child_process
(
process
.
pid
)
kill_child_process
(
process
.
pid
)
time
.
sleep
(
5
)
time
.
sleep
(
5
)
print
(
print
(
f
"
\n
Timeout after
{
timeout_per_file
}
seconds when running
{
filename
}
\n
"
f
"
\n
Timeout after
{
timeout_per_file
}
seconds when running
{
filename
}
\n
"
,
flush
=
True
,
)
)
success
=
False
success
=
False
break
break
if
success
:
if
success
:
print
(
f
"Success. Time elapsed:
{
time
.
time
()
-
tic
:.
2
f
}
s"
)
print
(
f
"Success. Time elapsed:
{
time
.
time
()
-
tic
:.
2
f
}
s"
,
flush
=
True
)
else
:
else
:
print
(
f
"Fail. Time elapsed:
{
time
.
time
()
-
tic
:.
2
f
}
s"
)
print
(
f
"Fail. Time elapsed:
{
time
.
time
()
-
tic
:.
2
f
}
s"
,
flush
=
True
)
return
0
if
success
else
-
1
return
0
if
success
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