Skip to content

Commit 2c21b3a

Browse files
Google APIscopybara-github
authored andcommitted
feat: Model Registry Checkpoint API
PiperOrigin-RevId: 720330032
1 parent 446b65c commit 2c21b3a

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

google/cloud/aiplatform/v1beta1/model.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ message Model {
180180
// The description of this version.
181181
string version_description = 30;
182182

183+
// The default checkpoint id of a model version.
184+
string default_checkpoint_id = 53;
185+
183186
// The schemata that describe formats of the Model's predictions and
184187
// explanations as given and returned via
185188
// [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict]

google/cloud/aiplatform/v1beta1/model_service.proto

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ service ModelService {
8484
option (google.api.method_signature) = "name";
8585
}
8686

87+
// Lists checkpoints of the specified model version.
88+
rpc ListModelVersionCheckpoints(ListModelVersionCheckpointsRequest)
89+
returns (ListModelVersionCheckpointsResponse) {
90+
option (google.api.http) = {
91+
get: "/v1beta1/{name=projects/*/locations/*/models/*}:listCheckpoints"
92+
};
93+
option (google.api.method_signature) = "name";
94+
}
95+
8796
// Updates a Model.
8897
rpc UpdateModel(UpdateModelRequest) returns (Model) {
8998
option (google.api.http) = {
@@ -460,6 +469,61 @@ message ListModelVersionsResponse {
460469
string next_page_token = 2;
461470
}
462471

472+
// Request message for
473+
// [ModelService.ListModelVersionCheckpoints][google.cloud.aiplatform.v1beta1.ModelService.ListModelVersionCheckpoints].
474+
message ListModelVersionCheckpointsRequest {
475+
// Required. The name of the model version to list checkpoints for.
476+
// `projects/{project}/locations/{location}/models/{model}@{version}`
477+
// Example: `projects/{project}/locations/{location}/models/{model}@2`
478+
// or
479+
// `projects/{project}/locations/{location}/models/{model}@golden`
480+
// If no version ID or alias is specified, the latest version will be
481+
// used.
482+
string name = 1 [
483+
(google.api.field_behavior) = REQUIRED,
484+
(google.api.resource_reference) = {
485+
type: "aiplatform.googleapis.com/Model"
486+
}
487+
];
488+
489+
// Optional. The standard list page size.
490+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
491+
492+
// Optional. The standard list page token.
493+
// Typically obtained via
494+
// [next_page_token][google.cloud.aiplatform.v1beta1.ListModelVersionCheckpointsResponse.next_page_token]
495+
// of the previous
496+
// [ListModelVersionCheckpoints][google.cloud.aiplatform.v1beta1.ModelService.ListModelVersionCheckpoints]
497+
// call.
498+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
499+
}
500+
501+
// A proto representation of a Spanner-stored ModelVersionCheckpoint.
502+
// The meaning of the fields is equivalent to their in-Spanner counterparts.
503+
message ModelVersionCheckpoint {
504+
// The ID of the checkpoint.
505+
string checkpoint_id = 1;
506+
507+
// The epoch of the checkpoint.
508+
int64 epoch = 2;
509+
510+
// The step of the checkpoint.
511+
int64 step = 3;
512+
}
513+
514+
// Response message for
515+
// [ModelService.ListModelVersionCheckpoints][google.cloud.aiplatform.v1beta1.ModelService.ListModelVersionCheckpoints]
516+
message ListModelVersionCheckpointsResponse {
517+
// List of Model Version checkpoints.
518+
repeated ModelVersionCheckpoint checkpoints = 1;
519+
520+
// A token to retrieve the next page of results.
521+
// Pass to
522+
// [ListModelVersionCheckpointsRequest.page_token][google.cloud.aiplatform.v1beta1.ListModelVersionCheckpointsRequest.page_token]
523+
// to obtain that page.
524+
string next_page_token = 2;
525+
}
526+
463527
// Request message for
464528
// [ModelService.UpdateModel][google.cloud.aiplatform.v1beta1.ModelService.UpdateModel].
465529
message UpdateModelRequest {

0 commit comments

Comments
 (0)