Skip to content

vllm.entrypoints.cli.benchmark.base

BenchmarkSubcommandBase

Bases: CLISubcommand

The base class of subcommands for vllm bench.

Source code in vllm/entrypoints/cli/benchmark/base.py
class BenchmarkSubcommandBase(CLISubcommand):
    """ The base class of subcommands for vllm bench. """

    help: str

    @classmethod
    def add_cli_args(cls, parser: argparse.ArgumentParser) -> None:
        """Add the CLI arguments to the parser."""
        raise NotImplementedError

    @staticmethod
    def cmd(args: argparse.Namespace) -> None:
        """Run the benchmark.

        Args:
            args: The arguments to the command.
        """
        raise NotImplementedError

help instance-attribute

help: str

add_cli_args classmethod

add_cli_args(parser: ArgumentParser) -> None

Add the CLI arguments to the parser.

Source code in vllm/entrypoints/cli/benchmark/base.py
@classmethod
def add_cli_args(cls, parser: argparse.ArgumentParser) -> None:
    """Add the CLI arguments to the parser."""
    raise NotImplementedError

cmd staticmethod

cmd(args: Namespace) -> None

Run the benchmark.

Parameters:

Name Type Description Default
args Namespace

The arguments to the command.

required
Source code in vllm/entrypoints/cli/benchmark/base.py
@staticmethod
def cmd(args: argparse.Namespace) -> None:
    """Run the benchmark.

    Args:
        args: The arguments to the command.
    """
    raise NotImplementedError