ray.serve.config.AutoscalingPolicy#

class ray.serve.config.AutoscalingPolicy(*, policy_function: str | Callable = 'ray.serve.autoscaling_policy:default_autoscaling_policy')[source]#

Bases: BaseModel

PublicAPI (alpha): This API is in alpha and may change before becoming stable.

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

policy_function