[Frontend] improve vllm bench <bench_type> --help display (#20430)
Signed-off-by: reidliu41 <reid201711@gmail.com>
This commit is contained in:
@@ -8,6 +8,8 @@ import typing
|
||||
|
||||
from vllm.entrypoints.cli.benchmark.base import BenchmarkSubcommandBase
|
||||
from vllm.entrypoints.cli.types import CLISubcommand
|
||||
from vllm.entrypoints.utils import (VLLM_SUBCMD_PARSER_EPILOG,
|
||||
show_filtered_argument_or_group_from_help)
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from vllm.utils import FlexibleArgumentParser
|
||||
@@ -45,6 +47,9 @@ class BenchmarkSubcommand(CLISubcommand):
|
||||
)
|
||||
cmd_subparser.set_defaults(dispatch_function=cmd_cls.cmd)
|
||||
cmd_cls.add_cli_args(cmd_subparser)
|
||||
show_filtered_argument_or_group_from_help(cmd_subparser,
|
||||
["bench", cmd_cls.name])
|
||||
cmd_subparser.epilog = VLLM_SUBCMD_PARSER_EPILOG
|
||||
return bench_parser
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class RunBatchSubcommand(CLISubcommand):
|
||||
)
|
||||
run_batch_parser = make_arg_parser(run_batch_parser)
|
||||
show_filtered_argument_or_group_from_help(run_batch_parser,
|
||||
"run-batch")
|
||||
["run-batch"])
|
||||
run_batch_parser.epilog = VLLM_SUBCMD_PARSER_EPILOG
|
||||
return run_batch_parser
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class ServeSubcommand(CLISubcommand):
|
||||
"https://docs.vllm.ai/en/latest/configuration/serve_args.html")
|
||||
|
||||
serve_parser = make_arg_parser(serve_parser)
|
||||
show_filtered_argument_or_group_from_help(serve_parser, "serve")
|
||||
show_filtered_argument_or_group_from_help(serve_parser, ["serve"])
|
||||
serve_parser.epilog = VLLM_SUBCMD_PARSER_EPILOG
|
||||
return serve_parser
|
||||
|
||||
|
||||
Reference in New Issue
Block a user