Skip to content

vllm.entrypoints.serve.sagemaker.api_router

Functions:

_attach_router(app, supported_tasks, model_config=None)

Register the SageMaker hosting routes (/ping, /invocations) on the app.

_required_fields(request_type)

The required top-level fields of each model that request_type accepts. A union contributes one set per member.

_restore_handler_levels(snapshot)

Restore handler levels from a snapshot.

_snapshot_handler_levels()

Snapshot handler levels for loggers that may be affected by third-party logging configuration side effects (e.g. model_hosting_container_standards calling configure_root_logger() at import time).

attach_router(app, supported_tasks, model_config=None)

Attach the SageMaker hosting endpoints to the API server.

Handler levels are snapshotted and restored because importing model_hosting_container_standards may reconfigure root logging.

sagemaker_standards_bootstrap(app)

Bootstrap the app with the SageMaker hosting standards.

Handler levels are restored right after the import because importing model_hosting_container_standards may reconfigure root logging, and bootstrap must run with the original levels.