Skip to content

Commit

Permalink
[Bench] Update API backend names (mlc-ai#2968)
Browse files Browse the repository at this point in the history
This PR updates the backend names, introducing one name per
backend framework. These backends may refer to the same api endpoint.
  • Loading branch information
MasterJH5574 authored Oct 8, 2024
1 parent d9b6c98 commit 01baf0b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/mlc_llm/bench/api_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 01baf0b

Please sign in to comment.