Skip to content

vllm.entrypoints.cli.collect_env

CollectEnvSubcommand

Bases: CLISubcommand

The collect-env subcommand for the vLLM CLI.

Source code in vllm/entrypoints/cli/collect_env.py
class CollectEnvSubcommand(CLISubcommand):
    """The `collect-env` subcommand for the vLLM CLI. """

    def __init__(self):
        self.name = "collect-env"
        super().__init__()

    @staticmethod
    def cmd(args: argparse.Namespace) -> None:
        """Collect information about the environment."""
        collect_env_main()

    def subparser_init(
            self,
            subparsers: argparse._SubParsersAction) -> FlexibleArgumentParser:
        collect_env_parser = subparsers.add_parser(
            "collect-env",
            help="Start collecting environment information.",
            description="Start collecting environment information.",
            usage="vllm collect-env")
        return collect_env_parser

name instance-attribute

name = 'collect-env'

__init__

__init__()
Source code in vllm/entrypoints/cli/collect_env.py
def __init__(self):
    self.name = "collect-env"
    super().__init__()

cmd staticmethod

cmd(args: Namespace) -> None

Collect information about the environment.

Source code in vllm/entrypoints/cli/collect_env.py
@staticmethod
def cmd(args: argparse.Namespace) -> None:
    """Collect information about the environment."""
    collect_env_main()

subparser_init

subparser_init(
    subparsers: _SubParsersAction,
) -> FlexibleArgumentParser
Source code in vllm/entrypoints/cli/collect_env.py
def subparser_init(
        self,
        subparsers: argparse._SubParsersAction) -> FlexibleArgumentParser:
    collect_env_parser = subparsers.add_parser(
        "collect-env",
        help="Start collecting environment information.",
        description="Start collecting environment information.",
        usage="vllm collect-env")
    return collect_env_parser

cmd_init

cmd_init() -> list[CLISubcommand]
Source code in vllm/entrypoints/cli/collect_env.py
def cmd_init() -> list[CLISubcommand]:
    return [CollectEnvSubcommand()]