Skip to content

Commit 446b65c

Browse files
Google APIscopybara-github
authored andcommitted
feat: Model Registry Checkpoint API
PiperOrigin-RevId: 720329155
1 parent 137b7e6 commit 446b65c

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

google/cloud/aiplatform/v1/model.proto

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

212+
// The default checkpoint id of a model version.
213+
string default_checkpoint_id = 53;
214+
212215
// The schemata that describe formats of the Model's predictions and
213216
// explanations as given and returned via
214217
// [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]

google/cloud/aiplatform/v1/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: "/v1/{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) = {
@@ -471,6 +480,61 @@ message ListModelVersionsResponse {
471480
string next_page_token = 2;
472481
}
473482

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

0 commit comments

Comments
 (0)