Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OpenAI API server in benchmark_serving.py #2172

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix tqdm
  • Loading branch information
hmellor committed Jan 19, 2024
commit ddd7e33f7b7d7182236db5ba0e28d07df54732dc
5 changes: 2 additions & 3 deletions benchmarks/benchmark_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,13 @@ async def benchmark(
request_rate: float,
) -> None:
tasks: List[asyncio.Task] = []
async for request in tqdm(get_request(input_requests, request_rate),
total=len(input_requests)):
async for request in get_request(input_requests, request_rate):
prompt, prompt_len, output_len = request
task = asyncio.create_task(
send_request(backend, model, api_url, prompt, prompt_len,
output_len, best_of, use_beam_search))
tasks.append(task)
await asyncio.gather(*tasks)
await tqdm.gather(*tasks)


def main(args: argparse.Namespace):
Expand Down
Loading