mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-15 00:55:40 +08:00
[Misc] add description attribute in CLI (#15921)
Signed-off-by: reidliu41 <reid201711@gmail.com> Co-authored-by: reidliu41 <reid201711@gmail.com>
This commit is contained in:
parent
7f6d47c1a2
commit
fad6e2538e
@ -32,6 +32,7 @@ class BenchmarkSubcommandBase(CLISubcommand):
|
|||||||
parser = subparsers.add_parser(
|
parser = subparsers.add_parser(
|
||||||
self.name,
|
self.name,
|
||||||
help=self.help,
|
help=self.help,
|
||||||
|
description=self.help,
|
||||||
usage=f"vllm bench {self.name} [options]")
|
usage=f"vllm bench {self.name} [options]")
|
||||||
self.add_cli_args(parser)
|
self.add_cli_args(parser)
|
||||||
return parser
|
return parser
|
||||||
|
|||||||
@ -33,6 +33,7 @@ class BenchmarkSubcommand(CLISubcommand):
|
|||||||
bench_parser = subparsers.add_parser(
|
bench_parser = subparsers.add_parser(
|
||||||
"bench",
|
"bench",
|
||||||
help="vLLM bench subcommand.",
|
help="vLLM bench subcommand.",
|
||||||
|
description="vLLM bench subcommand.",
|
||||||
usage="vllm bench <bench_type> [options]")
|
usage="vllm bench <bench_type> [options]")
|
||||||
bench_subparsers = bench_parser.add_subparsers(required=True,
|
bench_subparsers = bench_parser.add_subparsers(required=True,
|
||||||
dest="bench_type")
|
dest="bench_type")
|
||||||
|
|||||||
@ -126,7 +126,8 @@ class ChatCommand(CLISubcommand):
|
|||||||
subparsers: argparse._SubParsersAction) -> FlexibleArgumentParser:
|
subparsers: argparse._SubParsersAction) -> FlexibleArgumentParser:
|
||||||
chat_parser = subparsers.add_parser(
|
chat_parser = subparsers.add_parser(
|
||||||
"chat",
|
"chat",
|
||||||
help="Generate chat completions via the running API server",
|
help="Generate chat completions via the running API server.",
|
||||||
|
description="Generate chat completions via the running API server.",
|
||||||
usage="vllm chat [options]")
|
usage="vllm chat [options]")
|
||||||
_add_query_options(chat_parser)
|
_add_query_options(chat_parser)
|
||||||
chat_parser.add_argument(
|
chat_parser.add_argument(
|
||||||
@ -162,7 +163,9 @@ class CompleteCommand(CLISubcommand):
|
|||||||
complete_parser = subparsers.add_parser(
|
complete_parser = subparsers.add_parser(
|
||||||
"complete",
|
"complete",
|
||||||
help=("Generate text completions based on the given prompt "
|
help=("Generate text completions based on the given prompt "
|
||||||
"via the running API server"),
|
"via the running API server."),
|
||||||
|
description=("Generate text completions based on the given prompt "
|
||||||
|
"via the running API server."),
|
||||||
usage="vllm complete [options]")
|
usage="vllm complete [options]")
|
||||||
_add_query_options(complete_parser)
|
_add_query_options(complete_parser)
|
||||||
return complete_parser
|
return complete_parser
|
||||||
|
|||||||
@ -34,7 +34,8 @@ class ServeSubcommand(CLISubcommand):
|
|||||||
subparsers: argparse._SubParsersAction) -> FlexibleArgumentParser:
|
subparsers: argparse._SubParsersAction) -> FlexibleArgumentParser:
|
||||||
serve_parser = subparsers.add_parser(
|
serve_parser = subparsers.add_parser(
|
||||||
"serve",
|
"serve",
|
||||||
help="Start the vLLM OpenAI Compatible API server",
|
help="Start the vLLM OpenAI Compatible API server.",
|
||||||
|
description="Start the vLLM OpenAI Compatible API server.",
|
||||||
usage="vllm serve [model_tag] [options]")
|
usage="vllm serve [model_tag] [options]")
|
||||||
serve_parser.add_argument("model_tag",
|
serve_parser.add_argument("model_tag",
|
||||||
type=str,
|
type=str,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user