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
9924bbe1
Unverified
Commit
9924bbe1
authored
Apr 21, 2025
by
fzyzcjy
Committed by
GitHub
Apr 20, 2025
Browse files
Fix bench_serving fail when zero warmup requests (#5574)
parent
fbdc94ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
python/sglang/bench_serving.py
python/sglang/bench_serving.py
+3
-2
No files found.
python/sglang/bench_serving.py
View file @
9924bbe1
...
...
@@ -690,7 +690,6 @@ def sample_random_requests(
dataset_path
:
str
,
random_sample
:
bool
=
True
,
)
->
List
[
Tuple
[
str
,
int
,
int
]]:
input_lens
=
np
.
random
.
randint
(
max
(
int
(
input_len
*
range_ratio
),
1
),
input_len
+
1
,
...
...
@@ -1025,7 +1024,9 @@ async def benchmark(
warmup_outputs
=
await
asyncio
.
gather
(
*
warmup_tasks
)
# Check if at least one warmup request succeeded
if
not
any
(
output
.
success
for
output
in
warmup_outputs
):
if
args
.
warmup_requests
>
0
and
not
any
(
output
.
success
for
output
in
warmup_outputs
):
raise
ValueError
(
"Warmup failed - Please make sure benchmark arguments "
f
"are correctly specified. Error:
{
warmup_outputs
[
0
].
error
}
"
...
...
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