Skip to content

Commit 333c1ec

Browse files
Google APIscopybara-github
authored andcommitted
feat: add reservation affinity proto
feat: add spot field to Vertex Prediction's Dedicated Resources and Custom Training's Scheduling Strategy docs: update the description for the deprecated GPU (K80) PiperOrigin-RevId: 659688229
1 parent 00ed8aa commit 333c1ec

5 files changed

Lines changed: 93 additions & 2 deletions

File tree

google/cloud/aiplatform/v1beta1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ proto_library(
120120
"pipeline_state.proto",
121121
"prediction_service.proto",
122122
"publisher_model.proto",
123+
"reservation_affinity.proto",
123124
"reasoning_engine.proto",
124125
"reasoning_engine_execution_service.proto",
125126
"reasoning_engine_service.proto",

google/cloud/aiplatform/v1beta1/accelerator_type.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ enum AcceleratorType {
2929
// Unspecified accelerator type, which means no accelerator.
3030
ACCELERATOR_TYPE_UNSPECIFIED = 0;
3131

32-
// Nvidia Tesla K80 GPU.
32+
// Deprecated: Nvidia Tesla K80 GPU has reached end of support,
33+
// see https://cloud.google.com/compute/docs/eol/k80-eol.
3334
NVIDIA_TESLA_K80 = 1 [deprecated = true];
3435

3536
// Nvidia Tesla P100 GPU.

google/cloud/aiplatform/v1beta1/custom_job.proto

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,13 @@ message Scheduling {
364364
ON_DEMAND = 1;
365365

366366
// Low cost by making potential use of spot resources.
367-
LOW_COST = 2;
367+
LOW_COST = 2 [deprecated = true];
368+
369+
// Standard provisioning strategy uses regular on-demand resources.
370+
STANDARD = 3;
371+
372+
// Spot provisioning strategy uses spot resources.
373+
SPOT = 4;
368374
}
369375

370376
// The maximum job running time. The default is 7 days.

google/cloud/aiplatform/v1beta1/machine_resources.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1beta1;
1818

1919
import "google/api/field_behavior.proto";
2020
import "google/cloud/aiplatform/v1beta1/accelerator_type.proto";
21+
import "google/cloud/aiplatform/v1beta1/reservation_affinity.proto";
2122

2223
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
2324
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
@@ -56,6 +57,13 @@ message MachineSpec {
5657
// Immutable. The topology of the TPUs. Corresponds to the TPU topologies
5758
// available from GKE. (Example: tpu_topology: "2x2x1").
5859
string tpu_topology = 4 [(google.api.field_behavior) = IMMUTABLE];
60+
61+
// Optional. Immutable. Configuration controlling how this resource pool
62+
// consumes reservation.
63+
ReservationAffinity reservation_affinity = 5 [
64+
(google.api.field_behavior) = IMMUTABLE,
65+
(google.api.field_behavior) = OPTIONAL
66+
];
5967
}
6068

6169
// A description of resources that are dedicated to a DeployedModel, and
@@ -121,6 +129,10 @@ message DedicatedResources {
121129
// to `80`.
122130
repeated AutoscalingMetricSpec autoscaling_metric_specs = 4
123131
[(google.api.field_behavior) = IMMUTABLE];
132+
133+
// Optional. If true, schedule the deployment workload on [spot
134+
// VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
135+
bool spot = 5 [(google.api.field_behavior) = OPTIONAL];
124136
}
125137

126138
// A description of resources that to large degree are decided by Vertex AI,
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.aiplatform.v1beta1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
22+
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
23+
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "ReservationAffinityProto";
26+
option java_package = "com.google.cloud.aiplatform.v1beta1";
27+
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
28+
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
29+
option (google.api.resource_definition) = {
30+
type: "compute.googleapis.com/Reservation"
31+
pattern: "projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}"
32+
};
33+
34+
// A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a
35+
// DeployedModel) to draw its Compute Engine resources from a Shared
36+
// Reservation, or exclusively from on-demand capacity.
37+
message ReservationAffinity {
38+
// Identifies a type of reservation affinity.
39+
enum Type {
40+
// Default value. This should not be used.
41+
TYPE_UNSPECIFIED = 0;
42+
43+
// Do not consume from any reserved capacity, only use on-demand.
44+
NO_RESERVATION = 1;
45+
46+
// Consume any reservation available, falling back to on-demand.
47+
ANY_RESERVATION = 2;
48+
49+
// Consume from a specific reservation. When chosen, the reservation
50+
// must be identified via the `key` and `values` fields.
51+
SPECIFIC_RESERVATION = 3;
52+
}
53+
54+
// Required. Specifies the reservation affinity type.
55+
Type reservation_affinity_type = 1 [(google.api.field_behavior) = REQUIRED];
56+
57+
// Optional. Corresponds to the label key of a reservation resource. To target
58+
// a SPECIFIC_RESERVATION by name, use
59+
// `compute.googleapis.com/reservation-name` as the key and specify the name
60+
// of your reservation as its value.
61+
string key = 2 [(google.api.field_behavior) = OPTIONAL];
62+
63+
// Optional. Corresponds to the label values of a reservation resource. This
64+
// must be the full resource name of the reservation.
65+
repeated string values = 3 [
66+
(google.api.field_behavior) = OPTIONAL,
67+
(google.api.resource_reference) = {
68+
type: "compute.googleapis.com/Reservation"
69+
}
70+
];
71+
}

0 commit comments

Comments
 (0)