MCPcopy
hub / github.com/BytedTsinghua-SIA/DAPO / parse_vllm_args

Function parse_vllm_args

eval/llm.py:114–130  ·  view source on GitHub ↗

Parses vLLM args based on CLI inputs. Currently uses argparse because vLLM doesn't expose Python models for all of the config options we want to support.

(cli_args: Dict[str, str])

Source from the content-addressed store, hash-verified

112
113
114def parse_vllm_args(cli_args: Dict[str, str]):
115 """Parses vLLM args based on CLI inputs.
116
117 Currently uses argparse because vLLM doesn't expose Python models for all of the
118 config options we want to support.
119 """
120 arg_parser = FlexibleArgumentParser(
121 description="vLLM OpenAI-Compatible RESTful API server."
122 )
123
124 parser = make_arg_parser(arg_parser)
125 arg_strings = []
126 for key, value in cli_args.items():
127 arg_strings.extend([f"--{key}", str(value)])
128 logger.info(arg_strings)
129 parsed_args = parser.parse_args(args=arg_strings)
130 return parsed_args
131
132
133def build_app(cli_args: Dict[str, str]) -> serve.Application:

Callers 1

build_appFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected