vllm.entrypoints.openai.run_batch
_BAR_FORMAT module-attribute
¶
_BAR_FORMAT = "{desc}: {percentage:3.0f}% Completed | {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}]\n"
BatchProgressTracker ¶
Source code in vllm/entrypoints/openai/run_batch.py
main async
¶
main(args: Namespace)
Source code in vllm/entrypoints/openai/run_batch.py
make_arg_parser ¶
make_arg_parser(parser: FlexibleArgumentParser)
Source code in vllm/entrypoints/openai/run_batch.py
make_async_error_request_output async
¶
make_async_error_request_output(
request: BatchRequestInput, error_msg: str
) -> BatchRequestOutput
make_error_request_output ¶
make_error_request_output(
request: BatchRequestInput, error_msg: str
) -> BatchRequestOutput
Source code in vllm/entrypoints/openai/run_batch.py
parse_args ¶
read_file async
¶
Source code in vllm/entrypoints/openai/run_batch.py
run_batch async
¶
run_batch(
engine_client: EngineClient,
vllm_config: VllmConfig,
args: Namespace,
) -> None
Source code in vllm/entrypoints/openai/run_batch.py
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
|
run_request async
¶
run_request(
serving_engine_func: Callable,
request: BatchRequestInput,
tracker: BatchProgressTracker,
) -> BatchRequestOutput
Source code in vllm/entrypoints/openai/run_batch.py
upload_data async
¶
Upload a local file to a URL. output_url: The URL to upload the file to. data_or_file: Either the data to upload or the path to the file to upload. from_file: If True, data_or_file is the path to the file to upload.
Source code in vllm/entrypoints/openai/run_batch.py
write_file async
¶
write_file(
path_or_url: str,
batch_outputs: list[BatchRequestOutput],
output_tmp_dir: str,
) -> None
Write batch_outputs to a file or upload to a URL. path_or_url: The path or URL to write batch_outputs to. batch_outputs: The list of batch outputs to write. output_tmp_dir: The directory to store the output file before uploading it to the output URL.
Source code in vllm/entrypoints/openai/run_batch.py
write_local_file async
¶
write_local_file(
output_path: str,
batch_outputs: list[BatchRequestOutput],
) -> None
Write the responses to a local file. output_path: The path to write the responses to. batch_outputs: The list of batch outputs to write.