@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
2020import "google/api/client.proto" ;
2121import "google/api/field_behavior.proto" ;
2222import "google/api/resource.proto" ;
23+ import "google/cloud/aiplatform/v1beta1/io.proto" ;
2324import "google/cloud/aiplatform/v1beta1/machine_resources.proto" ;
2425import "google/cloud/aiplatform/v1beta1/model.proto" ;
2526import "google/cloud/aiplatform/v1beta1/operation.proto" ;
@@ -82,6 +83,19 @@ service ModelGardenService {
8283 metadata_type : "DeployPublisherModelOperationMetadata"
8384 };
8485 }
86+
87+ // Exports a publisher model to a user provided Google Cloud Storage bucket.
88+ rpc ExportPublisherModel (ExportPublisherModelRequest )
89+ returns (google.longrunning.Operation ) {
90+ option (google.api.http ) = {
91+ post : "/v1beta1/{parent=projects/*/locations/*}/{name=publishers/*/models/*}:export"
92+ body : "*"
93+ };
94+ option (google.longrunning.operation_info ) = {
95+ response_type : "ExportPublisherModelResponse"
96+ metadata_type : "ExportPublisherModelOperationMetadata"
97+ };
98+ }
8599}
86100
87101// View enumeration of PublisherModel.
@@ -414,6 +428,9 @@ message DeployOperationMetadata {
414428
415429 // Output only. The project number where the deploy model request is sent.
416430 int64 project_number = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
431+
432+ // Output only. The model id to be used at query time.
433+ string model_id = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
417434}
418435
419436// Runtime operation information for
@@ -447,3 +464,44 @@ message DeployPublisherModelOperationMetadata {
447464 // Output only. The project number where the deploy model request is sent.
448465 int64 project_number = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
449466}
467+
468+ // Response message for
469+ // [ModelGardenService.ExportPublisherModel][google.cloud.aiplatform.v1beta1.ModelGardenService.ExportPublisherModel].
470+ message ExportPublisherModelResponse {
471+ // The name of the PublisherModel resource.
472+ // Format:
473+ // `publishers/{publisher}/models/{publisher_model}@{version_id}`
474+ string publisher_model = 1 ;
475+
476+ // The destination uri of the model weights.
477+ string destination_uri = 2 ;
478+ }
479+
480+ // Runtime operation information for
481+ // [ModelGardenService.ExportPublisherModel][google.cloud.aiplatform.v1beta1.ModelGardenService.ExportPublisherModel].
482+ message ExportPublisherModelOperationMetadata {
483+ // The operation generic information.
484+ GenericOperationMetadata generic_metadata = 1 ;
485+ }
486+
487+ // Request message for
488+ // [ModelGardenService.ExportPublisherModel][google.cloud.aiplatform.v1beta1.ModelGardenService.ExportPublisherModel].
489+ message ExportPublisherModelRequest {
490+ // Required. The name of the PublisherModel resource.
491+ // Format:
492+ // `publishers/{publisher}/models/{publisher_model}@{version_id}`, or
493+ // `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`
494+ string name = 1 [(google.api.field_behavior ) = REQUIRED ];
495+
496+ // Required. The target where we are exporting the model weights to
497+ GcsDestination destination = 2 [(google.api.field_behavior ) = REQUIRED ];
498+
499+ // Required. The Location to export the model weights from
500+ // Format: `projects/{project}/locations/{location}`
501+ string parent = 3 [
502+ (google.api.field_behavior ) = REQUIRED ,
503+ (google.api.resource_reference ) = {
504+ type : "locations.googleapis.com/Location"
505+ }
506+ ];
507+ }
0 commit comments