"tests/vscode:/vscode.git/clone" did not exist on "6e1100889e6a675d17ad82815acf8f02f1cc419e"
collect_env.py 1 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
# SPDX-License-Identifier: Apache-2.0

import argparse

from vllm.collect_env import main as collect_env_main
from vllm.entrypoints.cli.types import CLISubcommand
from vllm.utils import FlexibleArgumentParser


class CollectEnvSubcommand(CLISubcommand):
Reid's avatar
Reid committed
11
    """The `collect-env` subcommand for the vLLM CLI. """
12
13
14
15
16
17
18
19
20
21
22
23
24

    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:
Reid's avatar
Reid committed
25
        collect_env_parser = subparsers.add_parser(
26
27
28
29
            "collect-env",
            help="Start collecting environment information.",
            description="Start collecting environment information.",
            usage="vllm collect-env")
Reid's avatar
Reid committed
30
        return collect_env_parser
31
32
33
34


def cmd_init() -> list[CLISubcommand]:
    return [CollectEnvSubcommand()]