main
py 27 lines 735 Bytes
Raw
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 import argparse
4
5 from vllm.entrypoints.cli.types import CLISubcommand
6 from vllm.utils.argparse_utils import FlexibleArgumentParser
7
8
9 class BenchmarkSubcommandBase(CLISubcommand):
10 """The base class of subcommands for `vllm bench`."""
11
12 help: str
13
14 @classmethod
15 def add_cli_args(cls, parser: FlexibleArgumentParser) -> None:
16 """Add the CLI arguments to the parser."""
17 raise NotImplementedError
18
19 @staticmethod
20 def cmd(args: argparse.Namespace) -> None:
21 """Run the benchmark.
22
23 Args:
24 args: The arguments to the command.
25
26 """
27 raise NotImplementedError