ray.serve.schema.DeploymentSchema#

class ray.serve.schema.DeploymentSchema(*, name: str, num_replicas: PositiveInt | str | None = DEFAULT.VALUE, max_ongoing_requests: ConstrainedIntValue = DEFAULT.VALUE, max_queued_requests: StrictInt = DEFAULT.VALUE, user_config: Dict | None = DEFAULT.VALUE, autoscaling_config: Dict | None = DEFAULT.VALUE, graceful_shutdown_wait_loop_s: ConstrainedFloatValue = DEFAULT.VALUE, graceful_shutdown_timeout_s: ConstrainedFloatValue = DEFAULT.VALUE, health_check_period_s: ConstrainedFloatValue = DEFAULT.VALUE, health_check_timeout_s: ConstrainedFloatValue = DEFAULT.VALUE, ray_actor_options: RayActorOptionsSchema = DEFAULT.VALUE, placement_group_bundles: List[Dict[str, float]] = DEFAULT.VALUE, placement_group_strategy: str = DEFAULT.VALUE, max_replicas_per_node: int = DEFAULT.VALUE, logging_config: LoggingConfig = DEFAULT.VALUE)[source]#

Bases: BaseModel

Specifies options for one deployment within a Serve application. For each deployment this can optionally be included in ServeApplicationSchema to override deployment options specified in code.

Methods

__init__

Create a new model by parsing and validating input data from keyword arguments.

construct

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.

copy

Duplicate a model, optionally choose which fields to include, exclude and change.

dict

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

json

Generate a JSON representation of the model, include and exclude arguments as per dict().

update_forward_refs

Try to update ForwardRefs on fields based on this Model, globalns and localns.

Attributes

name

num_replicas

max_ongoing_requests

max_queued_requests

user_config

autoscaling_config

graceful_shutdown_wait_loop_s

graceful_shutdown_timeout_s

health_check_period_s

health_check_timeout_s

ray_actor_options

placement_group_bundles

placement_group_strategy

max_replicas_per_node

logging_config