Skip to content

Commit

Permalink
feat: add deployment_timeout to UploadModel ModelContainerSpec
Browse files Browse the repository at this point in the history
feat: add shared_memory_size_mb to UploadModel ModelContainerSpec
feat: add startup_probe, health_probe to UploadModel ModelContainerSpec

PiperOrigin-RevId: 582390619
  • Loading branch information
Google APIs authored and Copybara-Service committed Nov 14, 2023
1 parent 92d962d commit 49c44ef
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions google/cloud/aiplatform/v1/model.proto
Expand Up @@ -22,6 +22,7 @@ import "google/cloud/aiplatform/v1/deployed_model_ref.proto";
import "google/cloud/aiplatform/v1/encryption_spec.proto";
import "google/cloud/aiplatform/v1/env_var.proto";
import "google/cloud/aiplatform/v1/explanation.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";

Expand Down Expand Up @@ -690,6 +691,21 @@ message ModelContainerSpec {
// [`AIP_DEPLOYED_MODEL_ID` environment
// variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
string health_route = 7 [(google.api.field_behavior) = IMMUTABLE];

// Immutable. Deployment timeout.
// Limit for deployment timeout is 2 hours.
google.protobuf.Duration deployment_timeout = 10
[(google.api.field_behavior) = IMMUTABLE];

// Immutable. The amount of the VM memory to reserve as the shared memory for
// the model in megabytes.
int64 shared_memory_size_mb = 11 [(google.api.field_behavior) = IMMUTABLE];

// Immutable. Specification for Kubernetes startup probe.
Probe startup_probe = 12 [(google.api.field_behavior) = IMMUTABLE];

// Immutable. Specification for Kubernetes readiness probe.
Probe health_probe = 13 [(google.api.field_behavior) = IMMUTABLE];
}

// Represents a network port in a container.
Expand Down Expand Up @@ -730,3 +746,35 @@ message ModelSourceInfo {
// pertains to the original.
bool copy = 2;
}

// Probe describes a health check to be performed against a container to
// determine whether it is alive or ready to receive traffic.
message Probe {
// ExecAction specifies a command to execute.
message ExecAction {
// Command is the command line to execute inside the container, the working
// directory for the command is root ('/') in the container's filesystem.
// The command is simply exec'd, it is not run inside a shell, so
// traditional shell instructions ('|', etc) won't work. To use a shell, you
// need to explicitly call out to that shell. Exit status of 0 is treated as
// live/healthy and non-zero is unhealthy.
repeated string command = 1;
}

oneof probe_type {
// Exec specifies the action to take.
ExecAction exec = 1;
}

// How often (in seconds) to perform the probe. Default to 10 seconds.
// Minimum value is 1. Must be less than timeout_seconds.
//
// Maps to Kubernetes probe argument 'periodSeconds'.
int32 period_seconds = 2;

// Number of seconds after which the probe times out. Defaults to 1 second.
// Minimum value is 1. Must be greater or equal to period_seconds.
//
// Maps to Kubernetes probe argument 'timeoutSeconds'.
int32 timeout_seconds = 3;
}

0 comments on commit 49c44ef

Please sign in to comment.