MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / make_arg_parser

Function make_arg_parser

fastdeploy/entrypoints/openai/run_batch.py:61–100  ·  view source on GitHub ↗
(parser: FlexibleArgumentParser)

Source from the content-addressed store, hash-verified

59
60
61def make_arg_parser(parser: FlexibleArgumentParser):
62 parser.add_argument(
63 "-i",
64 "--input-file",
65 required=True,
66 type=str,
67 help="The path or url to a single input file. Currently supports local file "
68 "paths, or the http protocol (http or https). If a URL is specified, "
69 "the file should be available via HTTP GET.",
70 )
71 parser.add_argument(
72 "-o",
73 "--output-file",
74 required=True,
75 type=str,
76 help="The path or url to a single output file. Currently supports "
77 "local file paths, or web (http or https) urls. If a URL is specified,"
78 " the file should be available via HTTP PUT.",
79 )
80 parser.add_argument(
81 "--output-tmp-dir",
82 type=str,
83 default=None,
84 help="The directory to store the output file before uploading it " "to the output URL.",
85 )
86 parser.add_argument(
87 "--max-waiting-time",
88 default=-1,
89 type=int,
90 help="max waiting time for connection, if set value -1 means no waiting time limit",
91 )
92 parser.add_argument("--port", default=8000, type=int, help="port to the http server")
93 # parser.add_argument("--host", default="0.0.0.0", type=str, help="host to the http server")
94 parser.add_argument("--workers", default=None, type=int, help="number of workers")
95 parser.add_argument("--max-concurrency", default=512, type=int, help="max concurrency")
96 parser.add_argument(
97 "--enable-mm-output", action="store_true", help="Enable 'multimodal_content' field in response output. "
98 )
99 parser = EngineArgs.add_cli_args(parser)
100 return parser
101
102
103def parse_args():

Callers 3

subparser_initMethod · 0.90
test_make_arg_parserMethod · 0.90
parse_argsFunction · 0.70

Calls 1

add_cli_argsMethod · 0.45

Tested by 1

test_make_arg_parserMethod · 0.72