From 5aa4a015ce4c85ad292a2f7d61df60a57ffc75b2 Mon Sep 17 00:00:00 2001 From: Brayden Zhong Date: Fri, 20 Jun 2025 00:28:55 -0400 Subject: [PATCH] [Benchmark] Fix `Value of type "SampleRequest" is not indexable` (#18032) Signed-off-by: Brayden Zhong --- benchmarks/benchmark_throughput.py | 2 +- vllm/benchmarks/throughput.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/benchmark_throughput.py b/benchmarks/benchmark_throughput.py index 401ebe0bdb265..0ded34c70badd 100644 --- a/benchmarks/benchmark_throughput.py +++ b/benchmarks/benchmark_throughput.py @@ -97,7 +97,7 @@ def run_vllm( assert lora_requests is None, "BeamSearch API does not support LoRA" prompts = [request.prompt for request in requests] # output_len should be the same for all requests. - output_len = requests[0][2] + output_len = requests[0].expected_output_len for request in requests: assert request.expected_output_len == output_len start = time.perf_counter() diff --git a/vllm/benchmarks/throughput.py b/vllm/benchmarks/throughput.py index be9ea39f0c38e..af2ca96571286 100644 --- a/vllm/benchmarks/throughput.py +++ b/vllm/benchmarks/throughput.py @@ -84,7 +84,7 @@ def run_vllm( assert lora_requests is None, "BeamSearch API does not support LoRA" prompts = [request.prompt for request in requests] # output_len should be the same for all requests. - output_len = requests[0][2] + output_len = requests[0].expected_output_len for request in requests: assert request.expected_output_len == output_len start = time.perf_counter()