-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
model_service.proto
915 lines (815 loc) · 34.5 KB
/
model_service.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.aiplatform.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/aiplatform/v1/encryption_spec.proto";
import "google/cloud/aiplatform/v1/evaluated_annotation.proto";
import "google/cloud/aiplatform/v1/explanation.proto";
import "google/cloud/aiplatform/v1/io.proto";
import "google/cloud/aiplatform/v1/model.proto";
import "google/cloud/aiplatform/v1/model_evaluation.proto";
import "google/cloud/aiplatform/v1/model_evaluation_slice.proto";
import "google/cloud/aiplatform/v1/operation.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
option csharp_namespace = "Google.Cloud.AIPlatform.V1";
option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "ModelServiceProto";
option java_package = "com.google.cloud.aiplatform.v1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
option ruby_package = "Google::Cloud::AIPlatform::V1";
// A service for managing Vertex AI's machine learning Models.
service ModelService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";
// Uploads a Model artifact into Vertex AI.
rpc UploadModel(UploadModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/models:upload"
body: "*"
};
option (google.api.method_signature) = "parent,model";
option (google.longrunning.operation_info) = {
response_type: "UploadModelResponse"
metadata_type: "UploadModelOperationMetadata"
};
}
// Gets a Model.
rpc GetModel(GetModelRequest) returns (Model) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/models/*}"
};
option (google.api.method_signature) = "name";
}
// Lists Models in a Location.
rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/models"
};
option (google.api.method_signature) = "parent";
}
// Lists versions of the specified model.
rpc ListModelVersions(ListModelVersionsRequest)
returns (ListModelVersionsResponse) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/models/*}:listVersions"
};
option (google.api.method_signature) = "name";
}
// Updates a Model.
rpc UpdateModel(UpdateModelRequest) returns (Model) {
option (google.api.http) = {
patch: "/v1/{model.name=projects/*/locations/*/models/*}"
body: "model"
};
option (google.api.method_signature) = "model,update_mask";
}
// Incrementally update the dataset used for an examples model.
rpc UpdateExplanationDataset(UpdateExplanationDatasetRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{model=projects/*/locations/*/models/*}:updateExplanationDataset"
body: "*"
};
option (google.api.method_signature) = "model";
option (google.longrunning.operation_info) = {
response_type: "UpdateExplanationDatasetResponse"
metadata_type: "UpdateExplanationDatasetOperationMetadata"
};
}
// Deletes a Model.
//
// A model cannot be deleted if any
// [Endpoint][google.cloud.aiplatform.v1.Endpoint] resource has a
// [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] based on the
// model in its
// [deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models]
// field.
rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/models/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Deletes a Model version.
//
// Model version can only be deleted if there are no
// [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it.
// Deleting the only version in the Model is not allowed. Use
// [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for
// deleting the Model instead.
rpc DeleteModelVersion(DeleteModelVersionRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/models/*}:deleteVersion"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Merges a set of aliases for a Model version.
rpc MergeVersionAliases(MergeVersionAliasesRequest) returns (Model) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/models/*}:mergeVersionAliases"
body: "*"
};
option (google.api.method_signature) = "name,version_aliases";
}
// Exports a trained, exportable Model to a location specified by the
// user. A Model is considered to be exportable if it has at least one
// [supported export
// format][google.cloud.aiplatform.v1.Model.supported_export_formats].
rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/models/*}:export"
body: "*"
};
option (google.api.method_signature) = "name,output_config";
option (google.longrunning.operation_info) = {
response_type: "ExportModelResponse"
metadata_type: "ExportModelOperationMetadata"
};
}
// Copies an already existing Vertex AI Model into the specified Location.
// The source Model must exist in the same Project.
// When copying custom Models, the users themselves are responsible for
// [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be
// region-agnostic, as well as making sure that any resources (e.g. files) it
// depends on remain accessible.
rpc CopyModel(CopyModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/models:copy"
body: "*"
};
option (google.api.method_signature) = "parent,source_model";
option (google.longrunning.operation_info) = {
response_type: "CopyModelResponse"
metadata_type: "CopyModelOperationMetadata"
};
}
// Imports an externally generated ModelEvaluation.
rpc ImportModelEvaluation(ImportModelEvaluationRequest)
returns (ModelEvaluation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/models/*}/evaluations:import"
body: "*"
};
option (google.api.method_signature) = "parent,model_evaluation";
}
// Imports a list of externally generated ModelEvaluationSlice.
rpc BatchImportModelEvaluationSlices(BatchImportModelEvaluationSlicesRequest)
returns (BatchImportModelEvaluationSlicesResponse) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices:batchImport"
body: "*"
};
option (google.api.method_signature) = "parent,model_evaluation_slices";
}
// Imports a list of externally generated EvaluatedAnnotations.
rpc BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest)
returns (BatchImportEvaluatedAnnotationsResponse) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport"
body: "*"
};
option (google.api.method_signature) = "parent,evaluated_annotations";
}
// Gets a ModelEvaluation.
rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/models/*/evaluations/*}"
};
option (google.api.method_signature) = "name";
}
// Lists ModelEvaluations in a Model.
rpc ListModelEvaluations(ListModelEvaluationsRequest)
returns (ListModelEvaluationsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/models/*}/evaluations"
};
option (google.api.method_signature) = "parent";
}
// Gets a ModelEvaluationSlice.
rpc GetModelEvaluationSlice(GetModelEvaluationSliceRequest)
returns (ModelEvaluationSlice) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/models/*/evaluations/*/slices/*}"
};
option (google.api.method_signature) = "name";
}
// Lists ModelEvaluationSlices in a ModelEvaluation.
rpc ListModelEvaluationSlices(ListModelEvaluationSlicesRequest)
returns (ListModelEvaluationSlicesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices"
};
option (google.api.method_signature) = "parent";
}
}
// Request message for
// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel].
message UploadModelRequest {
// Required. The resource name of the Location into which to upload the Model.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Optional. The resource name of the model into which to upload the version.
// Only specify this field when uploading a new version.
string parent_model = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. The ID to use for the uploaded Model, which will become the final
// component of the model resource name.
//
// This value may be up to 63 characters, and valid characters are
// `[a-z0-9_-]`. The first character cannot be a number or hyphen.
string model_id = 5 [(google.api.field_behavior) = OPTIONAL];
// Required. The Model to create.
Model model = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. The user-provided custom service account to use to do the model
// upload. If empty, [Vertex AI Service
// Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
// will be used to access resources needed to upload the model. This account
// must belong to the target project where the model is uploaded to, i.e., the
// project specified in the `parent` field of this request and have necessary
// read permissions (to Google Cloud Storage, Artifact Registry, etc.).
string service_account = 6 [(google.api.field_behavior) = OPTIONAL];
}
// Details of
// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]
// operation.
message UploadModelOperationMetadata {
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
}
// Response message of
// [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel]
// operation.
message UploadModelResponse {
// The name of the uploaded Model resource.
// Format: `projects/{project}/locations/{location}/models/{model}`
string model = 1 [(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}];
// Output only. The version ID of the model that is uploaded.
string model_version_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Request message for
// [ModelService.GetModel][google.cloud.aiplatform.v1.ModelService.GetModel].
message GetModelRequest {
// Required. The name of the Model resource.
// Format: `projects/{project}/locations/{location}/models/{model}`
//
// In order to retrieve a specific version of the model, also provide
// the version ID or version alias.
// Example: `projects/{project}/locations/{location}/models/{model}@2`
// or
// `projects/{project}/locations/{location}/models/{model}@golden`
// If no version ID or alias is specified, the "default" version will be
// returned. The "default" version alias is created for the first version of
// the model, and can be moved to other versions later on. There will be
// exactly one default version.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
}
// Request message for
// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels].
message ListModelsRequest {
// Required. The resource name of the Location to list the Models from.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// An expression for filtering the results of the request. For field names
// both snake_case and camelCase are supported.
//
// * `model` supports = and !=. `model` represents the Model ID,
// i.e. the last segment of the Model's [resource
// name][google.cloud.aiplatform.v1.Model.name].
// * `display_name` supports = and !=
// * `labels` supports general map functions that is:
// * `labels.key=value` - key:value equality
// * `labels.key:* or labels:key - key existence
// * A key including a space must be quoted. `labels."a key"`.
// * `base_model_name` only supports =
//
// Some examples:
//
// * `model=1234`
// * `displayName="myDisplayName"`
// * `labels.myKey="myValue"`
// * `baseModelName="text-bison"`
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token]
// of the previous
// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]
// call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
// A comma-separated list of fields to order by, sorted in ascending order.
// Use "desc" after a field name for descending.
// Supported fields:
//
// * `display_name`
// * `create_time`
// * `update_time`
//
// Example: `display_name, create_time desc`.
string order_by = 6;
}
// Response message for
// [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]
message ListModelsResponse {
// List of Models in the requested page.
repeated Model models = 1;
// A token to retrieve next page of results.
// Pass to
// [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token]
// to obtain that page.
string next_page_token = 2;
}
// Request message for
// [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions].
message ListModelVersionsRequest {
// Required. The name of the model to list versions for.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// The standard list page size.
int32 page_size = 2;
// The standard list page token.
// Typically obtained via
// [next_page_token][google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token]
// of the previous
// [ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions]
// call.
string page_token = 3;
// An expression for filtering the results of the request. For field names
// both snake_case and camelCase are supported.
//
// * `labels` supports general map functions that is:
// * `labels.key=value` - key:value equality
// * `labels.key:* or labels:key - key existence
// * A key including a space must be quoted. `labels."a key"`.
//
// Some examples:
//
// * `labels.myKey="myValue"`
string filter = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
// A comma-separated list of fields to order by, sorted in ascending order.
// Use "desc" after a field name for descending.
// Supported fields:
//
// * `create_time`
// * `update_time`
//
// Example: `update_time asc, create_time desc`.
string order_by = 6;
}
// Response message for
// [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions]
message ListModelVersionsResponse {
// List of Model versions in the requested page.
// In the returned Model name field, version ID instead of regvision tag will
// be included.
repeated Model models = 1;
// A token to retrieve the next page of results.
// Pass to
// [ListModelVersionsRequest.page_token][google.cloud.aiplatform.v1.ListModelVersionsRequest.page_token]
// to obtain that page.
string next_page_token = 2;
}
// Request message for
// [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel].
message UpdateModelRequest {
// Required. The Model which replaces the resource on the server.
// When Model Versioning is enabled, the model.name will be used to determine
// whether to update the model or model version.
// 1. model.name with the @ value, e.g. models/123@1, refers to a version
// specific update.
// 2. model.name without the @ value, e.g. models/123, refers to a model
// update.
// 3. model.name with @-, e.g. models/123@-, refers to a model update.
// 4. Supported model fields: display_name, description; supported
// version-specific fields: version_description. Labels are supported in both
// scenarios. Both the model labels and the version labels are merged when a
// model is returned. When updating labels, if the request is for
// model-specific update, model label gets updated. Otherwise, version labels
// get updated.
// 5. A model name or model version name fields update mismatch will cause a
// precondition error.
// 6. One request cannot update both the model and the version fields. You
// must update them separately.
Model model = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The update mask applies to the resource.
// For the `FieldMask` definition, see
// [google.protobuf.FieldMask][google.protobuf.FieldMask].
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];
}
// Request message for
// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset].
message UpdateExplanationDatasetRequest {
// Required. The resource name of the Model to update.
// Format: `projects/{project}/locations/{location}/models/{model}`
string model = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// The example config containing the location of the dataset.
Examples examples = 2;
}
// Runtime operation information for
// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset].
message UpdateExplanationDatasetOperationMetadata {
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
}
// Request message for
// [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel].
message DeleteModelRequest {
// Required. The name of the Model resource to be deleted.
// Format: `projects/{project}/locations/{location}/models/{model}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
}
// Request message for
// [ModelService.DeleteModelVersion][google.cloud.aiplatform.v1.ModelService.DeleteModelVersion].
message DeleteModelVersionRequest {
// Required. The name of the model version to be deleted, with a version ID
// explicitly included.
//
// Example: `projects/{project}/locations/{location}/models/{model}@1234`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
}
// Request message for
// [ModelService.MergeVersionAliases][google.cloud.aiplatform.v1.ModelService.MergeVersionAliases].
message MergeVersionAliasesRequest {
// Required. The name of the model version to merge aliases, with a version ID
// explicitly included.
//
// Example: `projects/{project}/locations/{location}/models/{model}@1234`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// Required. The set of version aliases to merge.
// The alias should be at most 128 characters, and match
// `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
// Add the `-` prefix to an alias means removing that alias from the version.
// `-` is NOT counted in the 128 characters. Example: `-golden` means removing
// the `golden` alias from the version.
//
// There is NO ordering in aliases, which means
// 1) The aliases returned from GetModel API might not have the exactly same
// order from this MergeVersionAliases API. 2) Adding and deleting the same
// alias in the request is not recommended, and the 2 operations will be
// cancelled out.
repeated string version_aliases = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for
// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel].
message ExportModelRequest {
// Output configuration for the Model export.
message OutputConfig {
// The ID of the format in which the Model must be exported. Each Model
// lists the [export formats it
// supports][google.cloud.aiplatform.v1.Model.supported_export_formats]. If
// no value is provided here, then the first from the list of the Model's
// supported formats is used by default.
string export_format_id = 1;
// The Cloud Storage location where the Model artifact is to be
// written to. Under the directory given as the destination a new one with
// name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
// will be created. Inside, the Model and any of its supporting files
// will be written.
// This field should only be set when the `exportableContent` field of the
// [Model.supported_export_formats] object contains `ARTIFACT`.
GcsDestination artifact_destination = 3;
// The Google Container Registry or Artifact Registry uri where the
// Model container image will be copied to.
// This field should only be set when the `exportableContent` field of the
// [Model.supported_export_formats] object contains `IMAGE`.
ContainerRegistryDestination image_destination = 4;
}
// Required. The resource name of the Model to export.
// The resource name may contain version id or version alias to specify the
// version, if no version is specified, the default version will be exported.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// Required. The desired output location and configuration.
OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
}
// Details of
// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]
// operation.
message ExportModelOperationMetadata {
// Further describes the output of the ExportModel. Supplements
// [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig].
message OutputInfo {
// Output only. If the Model artifact is being exported to Google Cloud
// Storage this is the full path of the directory created, into which the
// Model files are being written to.
string artifact_output_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. If the Model image is being exported to Google Container
// Registry or Artifact Registry this is the full path of the image created.
string image_output_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
// Output only. Information further describing the output of this Model
// export.
OutputInfo output_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Response message of
// [ModelService.UpdateExplanationDataset][google.cloud.aiplatform.v1.ModelService.UpdateExplanationDataset]
// operation.
message UpdateExplanationDatasetResponse {}
// Response message of
// [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel]
// operation.
message ExportModelResponse {}
// Request message for
// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel].
message CopyModelRequest {
// If both fields are unset, a new Model will be created with a generated ID.
oneof destination_model {
// Optional. Copy source_model into a new Model with this ID. The ID will
// become the final component of the model resource name.
//
// This value may be up to 63 characters, and valid characters are
// `[a-z0-9_-]`. The first character cannot be a number or hyphen.
string model_id = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Specify this field to copy source_model into this existing
// Model as a new version. Format:
// `projects/{project}/locations/{location}/models/{model}`
string parent_model = 5 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
}
// Required. The resource name of the Location into which to copy the Model.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The resource name of the Model to copy. That Model must be in the
// same Project. Format:
// `projects/{project}/locations/{location}/models/{model}`
string source_model = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// Customer-managed encryption key options. If this is set,
// then the Model copy will be encrypted with the provided encryption key.
EncryptionSpec encryption_spec = 3;
}
// Details of
// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
// operation.
message CopyModelOperationMetadata {
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
}
// Response message of
// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
// operation.
message CopyModelResponse {
// The name of the copied Model resource.
// Format: `projects/{project}/locations/{location}/models/{model}`
string model = 1 [(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}];
// Output only. The version ID of the model that is copied.
string model_version_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Request message for
// [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation]
message ImportModelEvaluationRequest {
// Required. The name of the parent model resource.
// Format: `projects/{project}/locations/{location}/models/{model}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// Required. Model evaluation resource to be imported.
ModelEvaluation model_evaluation = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for
// [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
message BatchImportModelEvaluationSlicesRequest {
// Required. The name of the parent ModelEvaluation resource.
// Format:
// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/ModelEvaluation"
}
];
// Required. Model evaluation slice resource to be imported.
repeated ModelEvaluationSlice model_evaluation_slices = 2
[(google.api.field_behavior) = REQUIRED];
}
// Response message for
// [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
message BatchImportModelEvaluationSlicesResponse {
// Output only. List of imported
// [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
repeated string imported_model_evaluation_slices = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// Request message for
// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations]
message BatchImportEvaluatedAnnotationsRequest {
// Required. The name of the parent ModelEvaluationSlice resource.
// Format:
// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/ModelEvaluationSlice"
}
];
// Required. Evaluated annotations resource to be imported.
repeated EvaluatedAnnotation evaluated_annotations = 2
[(google.api.field_behavior) = REQUIRED];
}
// Response message for
// [ModelService.BatchImportEvaluatedAnnotations][google.cloud.aiplatform.v1.ModelService.BatchImportEvaluatedAnnotations]
message BatchImportEvaluatedAnnotationsResponse {
// Output only. Number of EvaluatedAnnotations imported.
int32 imported_evaluated_annotations_count = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// Request message for
// [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation].
message GetModelEvaluationRequest {
// Required. The name of the ModelEvaluation resource.
// Format:
// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/ModelEvaluation"
}
];
}
// Request message for
// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
message ListModelEvaluationsRequest {
// Required. The resource name of the Model to list the ModelEvaluations from.
// Format: `projects/{project}/locations/{location}/models/{model}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// The standard list filter.
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token]
// of the previous
// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations]
// call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for
// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
message ListModelEvaluationsResponse {
// List of ModelEvaluations in the requested page.
repeated ModelEvaluation model_evaluations = 1;
// A token to retrieve next page of results.
// Pass to
// [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token]
// to obtain that page.
string next_page_token = 2;
}
// Request message for
// [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice].
message GetModelEvaluationSliceRequest {
// Required. The name of the ModelEvaluationSlice resource.
// Format:
// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/ModelEvaluationSlice"
}
];
}
// Request message for
// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
message ListModelEvaluationSlicesRequest {
// Required. The resource name of the ModelEvaluation to list the
// ModelEvaluationSlices from. Format:
// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/ModelEvaluation"
}
];
// The standard list filter.
//
// * `slice.dimension` - for =.
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token]
// of the previous
// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices]
// call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for
// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
message ListModelEvaluationSlicesResponse {
// List of ModelEvaluations in the requested page.
repeated ModelEvaluationSlice model_evaluation_slices = 1;
// A token to retrieve next page of results.
// Pass to
// [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token]
// to obtain that page.
string next_page_token = 2;
}