Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Feb 7, 2025
1 parent 67073db commit 3646a89
Show file tree
Hide file tree
Showing 2,793 changed files with 398 additions and 2,541,707 deletions.
2 changes: 2 additions & 0 deletions google/cloud/aiplatform_v1beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
from .types.endpoint import FasterDeploymentConfig
from .types.endpoint import PredictRequestResponseLoggingConfig
from .types.endpoint import PrivateEndpoints
from .types.endpoint import RolloutOptions
from .types.endpoint_service import CreateEndpointOperationMetadata
from .types.endpoint_service import CreateEndpointRequest
from .types.endpoint_service import DeleteEndpointRequest
Expand Down Expand Up @@ -2016,6 +2017,7 @@
"RetrievalMetadata",
"RetrieveContextsRequest",
"RetrieveContextsResponse",
"RolloutOptions",
"RougeInput",
"RougeInstance",
"RougeMetricValue",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/aiplatform_v1beta1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
FasterDeploymentConfig,
PredictRequestResponseLoggingConfig,
PrivateEndpoints,
RolloutOptions,
)
from .endpoint_service import (
CreateEndpointOperationMetadata,
Expand Down Expand Up @@ -1420,6 +1421,7 @@
"FasterDeploymentConfig",
"PredictRequestResponseLoggingConfig",
"PrivateEndpoints",
"RolloutOptions",
"CreateEndpointOperationMetadata",
"CreateEndpointRequest",
"DeleteEndpointRequest",
Expand Down
82 changes: 82 additions & 0 deletions google/cloud/aiplatform_v1beta1/types/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"PredictRequestResponseLoggingConfig",
"ClientConnectionConfig",
"FasterDeploymentConfig",
"RolloutOptions",
},
)

Expand Down Expand Up @@ -377,6 +378,8 @@ class DeployedModel(proto.Message):
is configured.
faster_deployment_config (google.cloud.aiplatform_v1beta1.types.FasterDeploymentConfig):
Configuration for faster model deployment.
rollout_options (google.cloud.aiplatform_v1beta1.types.RolloutOptions):
Options for configuring rolling deployments.
status (google.cloud.aiplatform_v1beta1.types.DeployedModel.Status):
Output only. Runtime status of the deployed
model.
Expand Down Expand Up @@ -484,6 +487,11 @@ class Status(proto.Message):
number=23,
message="FasterDeploymentConfig",
)
rollout_options: "RolloutOptions" = proto.Field(
proto.MESSAGE,
number=25,
message="RolloutOptions",
)
status: Status = proto.Field(
proto.MESSAGE,
number=26,
Expand Down Expand Up @@ -603,4 +611,78 @@ class FasterDeploymentConfig(proto.Message):
)


class RolloutOptions(proto.Message):
r"""Configuration for rolling deployments.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
max_unavailable_replicas (int):
Absolute count of replicas allowed to be
unavailable.
This field is a member of `oneof`_ ``max_unavailable``.
max_unavailable_percentage (int):
Percentage of replicas allowed to be
unavailable. For autoscaling deployments, this
refers to the target replica count.
This field is a member of `oneof`_ ``max_unavailable``.
max_surge_replicas (int):
Absolute count of allowed additional
replicas.
This field is a member of `oneof`_ ``max_surge``.
max_surge_percentage (int):
Percentage of allowed additional replicas.
For autoscaling deployments, this refers to the
target replica count.
This field is a member of `oneof`_ ``max_surge``.
previous_deployed_model (str):
ID of the DeployedModel that this deployment
should replace.
revision_number (int):
Output only. Read-only. Revision number
determines the relative priority of
DeployedModels in the same rollout. The
DeployedModel with the largest revision number
specifies the intended state of the deployment.
"""

max_unavailable_replicas: int = proto.Field(
proto.INT32,
number=3,
oneof="max_unavailable",
)
max_unavailable_percentage: int = proto.Field(
proto.INT32,
number=4,
oneof="max_unavailable",
)
max_surge_replicas: int = proto.Field(
proto.INT32,
number=5,
oneof="max_surge",
)
max_surge_percentage: int = proto.Field(
proto.INT32,
number=6,
oneof="max_surge",
)
previous_deployed_model: str = proto.Field(
proto.STRING,
number=1,
)
revision_number: int = proto.Field(
proto.INT32,
number=2,
)


__all__ = tuple(sorted(__protobuf__.manifest))
194 changes: 194 additions & 0 deletions google/cloud/aiplatform_v1beta1/types/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,9 @@ class ModelContainerSpec(proto.Message):
health_probe (google.cloud.aiplatform_v1beta1.types.Probe):
Immutable. Specification for Kubernetes
readiness probe.
liveness_probe (google.cloud.aiplatform_v1beta1.types.Probe):
Immutable. Specification for Kubernetes
liveness probe.
"""

image_uri: str = proto.Field(
Expand Down Expand Up @@ -1045,6 +1048,11 @@ class ModelContainerSpec(proto.Message):
number=13,
message="Probe",
)
liveness_probe: "Probe" = proto.Field(
proto.MESSAGE,
number=14,
message="Probe",
)


class Port(proto.Message):
Expand Down Expand Up @@ -1129,6 +1137,10 @@ class Probe(proto.Message):
container to determine whether it is alive or ready to receive
traffic.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Expand All @@ -1137,6 +1149,21 @@ class Probe(proto.Message):
ExecAction probes the health of a container
by executing a command.
This field is a member of `oneof`_ ``probe_type``.
http_get (google.cloud.aiplatform_v1beta1.types.Probe.HttpGetAction):
HttpGetAction probes the health of a
container by sending an HTTP GET request.
This field is a member of `oneof`_ ``probe_type``.
grpc (google.cloud.aiplatform_v1beta1.types.Probe.GrpcAction):
GrpcAction probes the health of a container
by sending a gRPC request.
This field is a member of `oneof`_ ``probe_type``.
tcp_socket (google.cloud.aiplatform_v1beta1.types.Probe.TcpSocketAction):
TcpSocketAction probes the health of a
container by opening a TCP socket connection.
This field is a member of `oneof`_ ``probe_type``.
period_seconds (int):
How often (in seconds) to perform the probe. Default to 10
Expand All @@ -1150,6 +1177,26 @@ class Probe(proto.Message):
period_seconds.
Maps to Kubernetes probe argument 'timeoutSeconds'.
failure_threshold (int):
Number of consecutive failures before the
probe is considered failed. Defaults to 3.
Minimum value is 1.
Maps to Kubernetes probe argument
'failureThreshold'.
success_threshold (int):
Number of consecutive successes before the
probe is considered successful. Defaults to 1.
Minimum value is 1.
Maps to Kubernetes probe argument
'successThreshold'.
initial_delay_seconds (int):
Number of seconds to wait before starting the
probe. Defaults to 0. Minimum value is 0.
Maps to Kubernetes probe argument
'initialDelaySeconds'.
"""

class ExecAction(proto.Message):
Expand All @@ -1171,12 +1218,147 @@ class ExecAction(proto.Message):
number=1,
)

class HttpGetAction(proto.Message):
r"""HttpGetAction describes an action based on HTTP Get requests.
Attributes:
path (str):
Path to access on the HTTP server.
port (int):
Number of the port to access on the
container. Number must be in the range 1 to
65535.
host (str):
Host name to connect to, defaults to the
model serving container's IP. You probably want
to set "Host" in httpHeaders instead.
scheme (str):
Scheme to use for connecting to the host.
Defaults to HTTP. Acceptable values are "HTTP"
or "HTTPS".
http_headers (MutableSequence[google.cloud.aiplatform_v1beta1.types.Probe.HttpHeader]):
Custom headers to set in the request. HTTP
allows repeated headers.
"""

path: str = proto.Field(
proto.STRING,
number=1,
)
port: int = proto.Field(
proto.INT32,
number=2,
)
host: str = proto.Field(
proto.STRING,
number=3,
)
scheme: str = proto.Field(
proto.STRING,
number=4,
)
http_headers: MutableSequence["Probe.HttpHeader"] = proto.RepeatedField(
proto.MESSAGE,
number=5,
message="Probe.HttpHeader",
)

class GrpcAction(proto.Message):
r"""GrpcAction checks the health of a container using a gRPC
service.
Attributes:
port (int):
Port number of the gRPC service. Number must
be in the range 1 to 65535.
service (str):
Service is the name of the service to place
in the gRPC HealthCheckRequest (see
https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
If this is not specified, the default behavior
is defined by gRPC.
"""

port: int = proto.Field(
proto.INT32,
number=1,
)
service: str = proto.Field(
proto.STRING,
number=2,
)

class TcpSocketAction(proto.Message):
r"""TcpSocketAction probes the health of a container by opening a
TCP socket connection.
Attributes:
port (int):
Number of the port to access on the
container. Number must be in the range 1 to
65535.
host (str):
Optional: Host name to connect to, defaults
to the model serving container's IP.
"""

port: int = proto.Field(
proto.INT32,
number=1,
)
host: str = proto.Field(
proto.STRING,
number=2,
)

class HttpHeader(proto.Message):
r"""HttpHeader describes a custom header to be used in HTTP
probes
Attributes:
name (str):
The header field name.
This will be canonicalized upon output, so
case-variant names will be understood as the
same header.
value (str):
The header field value
"""

name: str = proto.Field(
proto.STRING,
number=1,
)
value: str = proto.Field(
proto.STRING,
number=2,
)

exec_: ExecAction = proto.Field(
proto.MESSAGE,
number=1,
oneof="probe_type",
message=ExecAction,
)
http_get: HttpGetAction = proto.Field(
proto.MESSAGE,
number=4,
oneof="probe_type",
message=HttpGetAction,
)
grpc: GrpcAction = proto.Field(
proto.MESSAGE,
number=5,
oneof="probe_type",
message=GrpcAction,
)
tcp_socket: TcpSocketAction = proto.Field(
proto.MESSAGE,
number=6,
oneof="probe_type",
message=TcpSocketAction,
)
period_seconds: int = proto.Field(
proto.INT32,
number=2,
Expand All @@ -1185,6 +1367,18 @@ class ExecAction(proto.Message):
proto.INT32,
number=3,
)
failure_threshold: int = proto.Field(
proto.INT32,
number=7,
)
success_threshold: int = proto.Field(
proto.INT32,
number=8,
)
initial_delay_seconds: int = proto.Field(
proto.INT32,
number=9,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Loading

0 comments on commit 3646a89

Please sign in to comment.