From 01baf0be83a443cd8a4d90fb5fa7b589a988d893 Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Tue, 8 Oct 2024 15:25:44 -0400 Subject: [PATCH] [Bench] Update API backend names (#2968) This PR updates the backend names, introducing one name per backend framework. These backends may refer to the same api endpoint. --- python/mlc_llm/bench/api_endpoint.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/mlc_llm/bench/api_endpoint.py b/python/mlc_llm/bench/api_endpoint.py index aaf0baaf72..a44b6da690 100644 --- a/python/mlc_llm/bench/api_endpoint.py +++ b/python/mlc_llm/bench/api_endpoint.py @@ -436,19 +436,21 @@ async def __call__( # pylint: disable=too-many-branches,too-many-locals,too-man SUPPORTED_BACKENDS = [ "openai", - "openai-no-debug-config", "openai-chat", + "mlc", + "sglang", "tensorrt-llm", + "vllm", ] def create_api_endpoint(args: argparse.Namespace) -> APIEndPoint: """Create an API endpoint instance with regard to the specified endpoint kind.""" - if args.api_endpoint == "openai": + if args.api_endpoint in ["openai", "mlc", "sglang"]: return OpenAIEndPoint(args.host, args.port, args.timeout, args.include_server_metrics) - if args.api_endpoint == "openai-no-debug-config": + if args.api_endpoint == "vllm": return OpenAIEndPoint( - args.host, args.port, args.timeout, args.include_server_metrics, no_debug_config=True + args.host, args.port, args.timeout, include_server_metrics=False, no_debug_config=True ) if args.api_endpoint == "openai-chat": return OpenAIChatEndPoint(args.host, args.port, args.timeout, args.include_server_metrics)