fix(bench): wire request_func in bench_long_context ContextWorkloadGenerator (#23898)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex Nails
2026-04-28 14:45:51 -07:00
committed by GitHub
co-authored by Claude Opus 4.7
parent cf0061da43
commit 345fecc547
2 changed files with 131 additions and 3 deletions
+3 -3
View File
@@ -13,13 +13,13 @@ from bench_multiturn import (
from tqdm.asyncio import tqdm
from sglang.benchmark.utils import get_tokenizer
from sglang.test.kits.cache_hit_kit import async_request_sglang_generate
class ContextWorkloadGenerator(WorkloadGenerator):
def __init__(self, args):
# Construct the base URL for requests
self.baseurl = f"http://{args.host}:{args.port}/"
self.url = self.baseurl + "generate"
self.url = f"http://{args.host}:{args.port}/generate"
self.request_func = async_request_sglang_generate
self.tokenizer = get_tokenizer(args.model_path)
self.distribution = args.distribution