Unverified Commit 9924bbe1 authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Fix bench_serving fail when zero warmup requests (#5574)

parent fbdc94ba
......@@ -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}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment