32 lines
898 B
Python
32 lines
898 B
Python
"""Shared interface for vLLM-Omni benchmark CLI subcommands.
|
|
|
|
``OmniBenchmarkSubcommandBase`` defines the argument-registration and command
|
|
execution hooks required by benchmark implementations. The ``bench`` command
|
|
discovers its concrete subclasses and uses these hooks to build and dispatch
|
|
nested benchmark subcommands.
|
|
"""
|
|
|
|
import argparse
|
|
|
|
from vllm.entrypoints.cli.types import CLISubcommand
|
|
|
|
|
|
class OmniBenchmarkSubcommandBase(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
|