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
da6f8081
Unverified
Commit
da6f8081
authored
Jan 25, 2025
by
Lianmin Zheng
Committed by
GitHub
Jan 25, 2025
Browse files
Fix CI tests (#3132)
parent
9286740e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
.github/workflows/pr-test.yml
.github/workflows/pr-test.yml
+2
-0
test/srt/test_bench_serving.py
test/srt/test_bench_serving.py
+6
-6
No files found.
.github/workflows/pr-test.yml
View file @
da6f8081
...
@@ -43,6 +43,8 @@ jobs:
...
@@ -43,6 +43,8 @@ jobs:
-
name
:
Run test
-
name
:
Run test
timeout-minutes
:
10
timeout-minutes
:
10
env
:
OPENAI_API_KEY
:
${{ secrets.OPENAI_API_KEY }}
run
:
|
run
:
|
cd test/lang
cd test/lang
python3 run_suite.py --suite per-commit
python3 run_suite.py --suite per-commit
...
...
test/srt/test_bench_serving.py
View file @
da6f8081
...
@@ -49,7 +49,7 @@ class TestBenchServing(unittest.TestCase):
...
@@ -49,7 +49,7 @@ class TestBenchServing(unittest.TestCase):
)
)
# There is a regression with torch 2.5
# There is a regression with torch 2.5
# This number was 950 for torch 2.4
# This number was 950 for torch 2.4
self
.
assertGreater
(
res
[
"output_throughput"
],
85
0
)
self
.
assertGreater
(
res
[
"output_throughput"
],
100
0
)
def
test_offline_throughput_without_radix_cache
(
self
):
def
test_offline_throughput_without_radix_cache
(
self
):
res
=
run_bench_serving
(
res
=
run_bench_serving
(
...
@@ -114,7 +114,7 @@ class TestBenchServing(unittest.TestCase):
...
@@ -114,7 +114,7 @@ class TestBenchServing(unittest.TestCase):
f
"### test_offline_throughput_default_fp8
\n
"
f
"### test_offline_throughput_default_fp8
\n
"
f
'Output throughput:
{
res
[
"output_throughput"
]:.
2
f
}
token/s
\n
'
f
'Output throughput:
{
res
[
"output_throughput"
]:.
2
f
}
token/s
\n
'
)
)
self
.
assertGreater
(
res
[
"output_throughput"
],
3
85
0
)
self
.
assertGreater
(
res
[
"output_throughput"
],
3
90
0
)
def
test_online_latency_default
(
self
):
def
test_online_latency_default
(
self
):
res
=
run_bench_serving
(
res
=
run_bench_serving
(
...
@@ -129,7 +129,7 @@ class TestBenchServing(unittest.TestCase):
...
@@ -129,7 +129,7 @@ class TestBenchServing(unittest.TestCase):
f
"### test_online_latency_default
\n
"
f
"### test_online_latency_default
\n
"
f
'median_e2e_latency_ms :
{
res
[
"median_e2e_latency_ms"
]:.
2
f
}
ms
\n
'
f
'median_e2e_latency_ms :
{
res
[
"median_e2e_latency_ms"
]:.
2
f
}
ms
\n
'
)
)
self
.
assertLess
(
res
[
"median_e2e_latency_ms"
],
1
2
000
)
self
.
assertLess
(
res
[
"median_e2e_latency_ms"
],
1
1
000
)
self
.
assertLess
(
res
[
"median_ttft_ms"
],
86
)
self
.
assertLess
(
res
[
"median_ttft_ms"
],
86
)
self
.
assertLess
(
res
[
"median_itl_ms"
],
10
)
self
.
assertLess
(
res
[
"median_itl_ms"
],
10
)
...
@@ -161,7 +161,7 @@ class TestBenchServing(unittest.TestCase):
...
@@ -161,7 +161,7 @@ class TestBenchServing(unittest.TestCase):
f
"### test_online_latency_eagle
\n
"
f
"### test_online_latency_eagle
\n
"
f
'median_e2e_latency_ms :
{
res
[
"median_e2e_latency_ms"
]:.
2
f
}
ms
\n
'
f
'median_e2e_latency_ms :
{
res
[
"median_e2e_latency_ms"
]:.
2
f
}
ms
\n
'
)
)
self
.
assertLess
(
res
[
"median_e2e_latency_ms"
],
1000
0
)
self
.
assertLess
(
res
[
"median_e2e_latency_ms"
],
45
0
)
def
test_moe_offline_throughput_default
(
self
):
def
test_moe_offline_throughput_default
(
self
):
res
=
run_bench_serving
(
res
=
run_bench_serving
(
...
@@ -176,7 +176,7 @@ class TestBenchServing(unittest.TestCase):
...
@@ -176,7 +176,7 @@ class TestBenchServing(unittest.TestCase):
f
"### test_moe_offline_throughput_default
\n
"
f
"### test_moe_offline_throughput_default
\n
"
f
'Output throughput:
{
res
[
"output_throughput"
]:.
2
f
}
token/s
\n
'
f
'Output throughput:
{
res
[
"output_throughput"
]:.
2
f
}
token/s
\n
'
)
)
self
.
assertGreater
(
res
[
"output_throughput"
],
2
15
0
)
self
.
assertGreater
(
res
[
"output_throughput"
],
2
20
0
)
def
test_moe_offline_throughput_without_radix_cache
(
self
):
def
test_moe_offline_throughput_without_radix_cache
(
self
):
res
=
run_bench_serving
(
res
=
run_bench_serving
(
...
@@ -191,7 +191,7 @@ class TestBenchServing(unittest.TestCase):
...
@@ -191,7 +191,7 @@ class TestBenchServing(unittest.TestCase):
f
"### test_moe_offline_throughput_without_radix_cache
\n
"
f
"### test_moe_offline_throughput_without_radix_cache
\n
"
f
'Output throughput:
{
res
[
"output_throughput"
]:.
2
f
}
token/s
\n
'
f
'Output throughput:
{
res
[
"output_throughput"
]:.
2
f
}
token/s
\n
'
)
)
self
.
assertGreater
(
res
[
"output_throughput"
],
2
15
0
)
self
.
assertGreater
(
res
[
"output_throughput"
],
2
20
0
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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