ray.serve.config.AutoscalingConfig#

class ray.serve.config.AutoscalingConfig(*, min_replicas: NonNegativeInt = 1, initial_replicas: NonNegativeInt | None = None, max_replicas: PositiveInt = 1, target_ongoing_requests: PositiveFloat = 2, metrics_interval_s: PositiveFloat = 10.0, look_back_period_s: PositiveFloat = 30.0, smoothing_factor: PositiveFloat = 1.0, upscale_smoothing_factor: PositiveFloat | None = None, downscale_smoothing_factor: PositiveFloat | None = None, upscaling_factor: PositiveFloat | None = None, downscaling_factor: PositiveFloat | None = None, downscale_delay_s: NonNegativeFloat = 600.0, upscale_delay_s: NonNegativeFloat = 30.0)[source]#

Bases: BaseModel

Config for the Serve Autoscaler.

Methods

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.

get_policy

Deserialize policy from cloudpickled bytes.

json

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

serialize_policy

Serialize policy with cloudpickle.

update_forward_refs

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

Attributes

min_replicas

initial_replicas

max_replicas

target_ongoing_requests

metrics_interval_s

look_back_period_s

smoothing_factor

upscale_smoothing_factor

downscale_smoothing_factor

upscaling_factor

downscaling_factor

downscale_delay_s

upscale_delay_s