model_service.proto 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.aiplatform.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/aiplatform/v1/io.proto";
  21. import "google/cloud/aiplatform/v1/model.proto";
  22. import "google/cloud/aiplatform/v1/model_evaluation.proto";
  23. import "google/cloud/aiplatform/v1/model_evaluation_slice.proto";
  24. import "google/cloud/aiplatform/v1/operation.proto";
  25. import "google/longrunning/operations.proto";
  26. import "google/protobuf/field_mask.proto";
  27. option csharp_namespace = "Google.Cloud.AIPlatform.V1";
  28. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform";
  29. option java_multiple_files = true;
  30. option java_outer_classname = "ModelServiceProto";
  31. option java_package = "com.google.cloud.aiplatform.v1";
  32. option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
  33. option ruby_package = "Google::Cloud::AIPlatform::V1";
  34. // A service for managing Vertex AI's machine learning Models.
  35. service ModelService {
  36. option (google.api.default_host) = "aiplatform.googleapis.com";
  37. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  38. // Uploads a Model artifact into Vertex AI.
  39. rpc UploadModel(UploadModelRequest) returns (google.longrunning.Operation) {
  40. option (google.api.http) = {
  41. post: "/v1/{parent=projects/*/locations/*}/models:upload"
  42. body: "*"
  43. };
  44. option (google.api.method_signature) = "parent,model";
  45. option (google.longrunning.operation_info) = {
  46. response_type: "UploadModelResponse"
  47. metadata_type: "UploadModelOperationMetadata"
  48. };
  49. }
  50. // Gets a Model.
  51. rpc GetModel(GetModelRequest) returns (Model) {
  52. option (google.api.http) = {
  53. get: "/v1/{name=projects/*/locations/*/models/*}"
  54. };
  55. option (google.api.method_signature) = "name";
  56. }
  57. // Lists Models in a Location.
  58. rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
  59. option (google.api.http) = {
  60. get: "/v1/{parent=projects/*/locations/*}/models"
  61. };
  62. option (google.api.method_signature) = "parent";
  63. }
  64. // Lists versions of the specified model.
  65. rpc ListModelVersions(ListModelVersionsRequest) returns (ListModelVersionsResponse) {
  66. option (google.api.http) = {
  67. get: "/v1/{name=projects/*/locations/*/models/*}:listVersions"
  68. };
  69. option (google.api.method_signature) = "name";
  70. }
  71. // Updates a Model.
  72. rpc UpdateModel(UpdateModelRequest) returns (Model) {
  73. option (google.api.http) = {
  74. patch: "/v1/{model.name=projects/*/locations/*/models/*}"
  75. body: "model"
  76. };
  77. option (google.api.method_signature) = "model,update_mask";
  78. }
  79. // Deletes a Model.
  80. //
  81. // A model cannot be deleted if any [Endpoint][google.cloud.aiplatform.v1.Endpoint] resource has a
  82. // [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] based on the model in its
  83. // [deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] field.
  84. rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) {
  85. option (google.api.http) = {
  86. delete: "/v1/{name=projects/*/locations/*/models/*}"
  87. };
  88. option (google.api.method_signature) = "name";
  89. option (google.longrunning.operation_info) = {
  90. response_type: "google.protobuf.Empty"
  91. metadata_type: "DeleteOperationMetadata"
  92. };
  93. }
  94. // Deletes a Model version.
  95. //
  96. // Model version can only be deleted if there are no [DeployedModels][]
  97. // created from it. Deleting the only version in the Model is not allowed. Use
  98. // [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for deleting the Model instead.
  99. rpc DeleteModelVersion(DeleteModelVersionRequest) returns (google.longrunning.Operation) {
  100. option (google.api.http) = {
  101. delete: "/v1/{name=projects/*/locations/*/models/*}:deleteVersion"
  102. };
  103. option (google.api.method_signature) = "name";
  104. option (google.longrunning.operation_info) = {
  105. response_type: "google.protobuf.Empty"
  106. metadata_type: "DeleteOperationMetadata"
  107. };
  108. }
  109. // Merges a set of aliases for a Model version.
  110. rpc MergeVersionAliases(MergeVersionAliasesRequest) returns (Model) {
  111. option (google.api.http) = {
  112. post: "/v1/{name=projects/*/locations/*/models/*}:mergeVersionAliases"
  113. body: "*"
  114. };
  115. option (google.api.method_signature) = "name,version_aliases";
  116. }
  117. // Exports a trained, exportable Model to a location specified by the
  118. // user. A Model is considered to be exportable if it has at least one
  119. // [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
  120. rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) {
  121. option (google.api.http) = {
  122. post: "/v1/{name=projects/*/locations/*/models/*}:export"
  123. body: "*"
  124. };
  125. option (google.api.method_signature) = "name,output_config";
  126. option (google.longrunning.operation_info) = {
  127. response_type: "ExportModelResponse"
  128. metadata_type: "ExportModelOperationMetadata"
  129. };
  130. }
  131. // Imports an externally generated ModelEvaluation.
  132. rpc ImportModelEvaluation(ImportModelEvaluationRequest) returns (ModelEvaluation) {
  133. option (google.api.http) = {
  134. post: "/v1/{parent=projects/*/locations/*/models/*}/evaluations:import"
  135. body: "*"
  136. };
  137. option (google.api.method_signature) = "parent,model_evaluation";
  138. }
  139. // Imports a list of externally generated ModelEvaluationSlice.
  140. rpc BatchImportModelEvaluationSlices(BatchImportModelEvaluationSlicesRequest) returns (BatchImportModelEvaluationSlicesResponse) {
  141. option (google.api.http) = {
  142. post: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices:batchImport"
  143. body: "*"
  144. };
  145. option (google.api.method_signature) = "parent,model_evaluation_slices";
  146. }
  147. // Gets a ModelEvaluation.
  148. rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) {
  149. option (google.api.http) = {
  150. get: "/v1/{name=projects/*/locations/*/models/*/evaluations/*}"
  151. };
  152. option (google.api.method_signature) = "name";
  153. }
  154. // Lists ModelEvaluations in a Model.
  155. rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) {
  156. option (google.api.http) = {
  157. get: "/v1/{parent=projects/*/locations/*/models/*}/evaluations"
  158. };
  159. option (google.api.method_signature) = "parent";
  160. }
  161. // Gets a ModelEvaluationSlice.
  162. rpc GetModelEvaluationSlice(GetModelEvaluationSliceRequest) returns (ModelEvaluationSlice) {
  163. option (google.api.http) = {
  164. get: "/v1/{name=projects/*/locations/*/models/*/evaluations/*/slices/*}"
  165. };
  166. option (google.api.method_signature) = "name";
  167. }
  168. // Lists ModelEvaluationSlices in a ModelEvaluation.
  169. rpc ListModelEvaluationSlices(ListModelEvaluationSlicesRequest) returns (ListModelEvaluationSlicesResponse) {
  170. option (google.api.http) = {
  171. get: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices"
  172. };
  173. option (google.api.method_signature) = "parent";
  174. }
  175. }
  176. // Request message for [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel].
  177. message UploadModelRequest {
  178. // Required. The resource name of the Location into which to upload the Model.
  179. // Format: `projects/{project}/locations/{location}`
  180. string parent = 1 [
  181. (google.api.field_behavior) = REQUIRED,
  182. (google.api.resource_reference) = {
  183. type: "locations.googleapis.com/Location"
  184. }
  185. ];
  186. // Optional. The resource name of the model into which to upload the version. Only
  187. // specify this field when uploading a new version.
  188. string parent_model = 4 [(google.api.field_behavior) = OPTIONAL];
  189. // Optional. The ID to use for the uploaded Model, which will become the final
  190. // component of the model resource name.
  191. //
  192. // This value may be up to 63 characters, and valid characters are
  193. // `[a-z0-9_-]`. The first character cannot be a number or hyphen.
  194. string model_id = 5 [(google.api.field_behavior) = OPTIONAL];
  195. // Required. The Model to create.
  196. Model model = 2 [(google.api.field_behavior) = REQUIRED];
  197. }
  198. // Details of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation.
  199. message UploadModelOperationMetadata {
  200. // The common part of the operation metadata.
  201. GenericOperationMetadata generic_metadata = 1;
  202. }
  203. // Response message of [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel] operation.
  204. message UploadModelResponse {
  205. // The name of the uploaded Model resource.
  206. // Format: `projects/{project}/locations/{location}/models/{model}`
  207. string model = 1 [(google.api.resource_reference) = {
  208. type: "aiplatform.googleapis.com/Model"
  209. }];
  210. // Output only. The version ID of the model that is uploaded.
  211. string model_version_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  212. }
  213. // Request message for [ModelService.GetModel][google.cloud.aiplatform.v1.ModelService.GetModel].
  214. message GetModelRequest {
  215. // Required. The name of the Model resource.
  216. // Format: `projects/{project}/locations/{location}/models/{model}`
  217. //
  218. // In order to retrieve a specific version of the model, also provide
  219. // the version ID or version alias.
  220. // Example: `projects/{project}/locations/{location}/models/{model}@2`
  221. // or
  222. // `projects/{project}/locations/{location}/models/{model}@golden`
  223. // If no version ID or alias is specified, the "default" version will be
  224. // returned. The "default" version alias is created for the first version of
  225. // the model, and can be moved to other versions later on. There will be
  226. // exactly one default version.
  227. string name = 1 [
  228. (google.api.field_behavior) = REQUIRED,
  229. (google.api.resource_reference) = {
  230. type: "aiplatform.googleapis.com/Model"
  231. }
  232. ];
  233. }
  234. // Request message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels].
  235. message ListModelsRequest {
  236. // Required. The resource name of the Location to list the Models from.
  237. // Format: `projects/{project}/locations/{location}`
  238. string parent = 1 [
  239. (google.api.field_behavior) = REQUIRED,
  240. (google.api.resource_reference) = {
  241. type: "locations.googleapis.com/Location"
  242. }
  243. ];
  244. // An expression for filtering the results of the request. For field names
  245. // both snake_case and camelCase are supported.
  246. //
  247. // * `model` supports = and !=. `model` represents the Model ID,
  248. // i.e. the last segment of the Model's [resource name][google.cloud.aiplatform.v1.Model.name].
  249. // * `display_name` supports = and !=
  250. // * `labels` supports general map functions that is:
  251. // * `labels.key=value` - key:value equality
  252. // * `labels.key:* or labels:key - key existence
  253. // * A key including a space must be quoted. `labels."a key"`.
  254. //
  255. // Some examples:
  256. //
  257. // * `model=1234`
  258. // * `displayName="myDisplayName"`
  259. // * `labels.myKey="myValue"`
  260. string filter = 2;
  261. // The standard list page size.
  262. int32 page_size = 3;
  263. // The standard list page token.
  264. // Typically obtained via
  265. // [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelsResponse.next_page_token] of the previous
  266. // [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels] call.
  267. string page_token = 4;
  268. // Mask specifying which fields to read.
  269. google.protobuf.FieldMask read_mask = 5;
  270. // A comma-separated list of fields to order by, sorted in ascending order.
  271. // Use "desc" after a field name for descending.
  272. // Supported fields:
  273. //
  274. // * `display_name`
  275. // * `create_time`
  276. // * `update_time`
  277. //
  278. // Example: `display_name, create_time desc`.
  279. string order_by = 6;
  280. }
  281. // Response message for [ModelService.ListModels][google.cloud.aiplatform.v1.ModelService.ListModels]
  282. message ListModelsResponse {
  283. // List of Models in the requested page.
  284. repeated Model models = 1;
  285. // A token to retrieve next page of results.
  286. // Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1.ListModelsRequest.page_token] to obtain that page.
  287. string next_page_token = 2;
  288. }
  289. // Request message for [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions].
  290. message ListModelVersionsRequest {
  291. // Required. The name of the model to list versions for.
  292. string name = 1 [
  293. (google.api.field_behavior) = REQUIRED,
  294. (google.api.resource_reference) = {
  295. type: "aiplatform.googleapis.com/Model"
  296. }
  297. ];
  298. // The standard list page size.
  299. int32 page_size = 2;
  300. // The standard list page token.
  301. // Typically obtained via
  302. // [ListModelVersionsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token] of the previous
  303. // [ModelService.ListModelversions][] call.
  304. string page_token = 3;
  305. // An expression for filtering the results of the request. For field names
  306. // both snake_case and camelCase are supported.
  307. //
  308. // * `labels` supports general map functions that is:
  309. // * `labels.key=value` - key:value equality
  310. // * `labels.key:* or labels:key - key existence
  311. // * A key including a space must be quoted. `labels."a key"`.
  312. //
  313. // Some examples:
  314. //
  315. // * `labels.myKey="myValue"`
  316. string filter = 4;
  317. // Mask specifying which fields to read.
  318. google.protobuf.FieldMask read_mask = 5;
  319. }
  320. // Response message for [ModelService.ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions]
  321. message ListModelVersionsResponse {
  322. // List of Model versions in the requested page.
  323. // In the returned Model name field, version ID instead of regvision tag will
  324. // be included.
  325. repeated Model models = 1;
  326. // A token to retrieve the next page of results.
  327. // Pass to [ListModelVersionsRequest.page_token][google.cloud.aiplatform.v1.ListModelVersionsRequest.page_token] to obtain that page.
  328. string next_page_token = 2;
  329. }
  330. // Request message for [ModelService.UpdateModel][google.cloud.aiplatform.v1.ModelService.UpdateModel].
  331. message UpdateModelRequest {
  332. // Required. The Model which replaces the resource on the server.
  333. // When Model Versioning is enabled, the model.name will be used to determine
  334. // whether to update the model or model version.
  335. // 1. model.name with the @ value, e.g. models/123@1, refers to a version
  336. // specific update.
  337. // 2. model.name without the @ value, e.g. models/123, refers to a model
  338. // update.
  339. // 3. model.name with @-, e.g. models/123@-, refers to a model update.
  340. // 4. Supported model fields: display_name, description; supported
  341. // version-specific fields: version_description. Labels are supported in both
  342. // scenarios. Both the model labels and the version labels are merged when a
  343. // model is returned. When updating labels, if the request is for
  344. // model-specific update, model label gets updated. Otherwise, version labels
  345. // get updated.
  346. // 5. A model name or model version name fields update mismatch will cause a
  347. // precondition error.
  348. // 6. One request cannot update both the model and the version fields. You
  349. // must update them separately.
  350. Model model = 1 [(google.api.field_behavior) = REQUIRED];
  351. // Required. The update mask applies to the resource.
  352. // For the `FieldMask` definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask].
  353. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  354. }
  355. // Request message for [ModelService.DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel].
  356. message DeleteModelRequest {
  357. // Required. The name of the Model resource to be deleted.
  358. // Format: `projects/{project}/locations/{location}/models/{model}`
  359. string name = 1 [
  360. (google.api.field_behavior) = REQUIRED,
  361. (google.api.resource_reference) = {
  362. type: "aiplatform.googleapis.com/Model"
  363. }
  364. ];
  365. }
  366. // Request message for [ModelService.DeleteModelVersion][google.cloud.aiplatform.v1.ModelService.DeleteModelVersion].
  367. message DeleteModelVersionRequest {
  368. // Required. The name of the model version to be deleted, with a version ID explicitly
  369. // included.
  370. //
  371. // Example: `projects/{project}/locations/{location}/models/{model}@1234`
  372. string name = 1 [
  373. (google.api.field_behavior) = REQUIRED,
  374. (google.api.resource_reference) = {
  375. type: "aiplatform.googleapis.com/Model"
  376. }
  377. ];
  378. }
  379. // Request message for [ModelService.MergeVersionAliases][google.cloud.aiplatform.v1.ModelService.MergeVersionAliases].
  380. message MergeVersionAliasesRequest {
  381. // Required. The name of the model version to merge aliases, with a version ID
  382. // explicitly included.
  383. //
  384. // Example: `projects/{project}/locations/{location}/models/{model}@1234`
  385. string name = 1 [
  386. (google.api.field_behavior) = REQUIRED,
  387. (google.api.resource_reference) = {
  388. type: "aiplatform.googleapis.com/Model"
  389. }
  390. ];
  391. // Required. The set of version aliases to merge.
  392. // The alias should be at most 128 characters, and match
  393. // `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
  394. // Add the `-` prefix to an alias means removing that alias from the version.
  395. // `-` is NOT counted in the 128 characters. Example: `-golden` means removing
  396. // the `golden` alias from the version.
  397. //
  398. // There is NO ordering in aliases, which means
  399. // 1) The aliases returned from GetModel API might not have the exactly same
  400. // order from this MergeVersionAliases API. 2) Adding and deleting the same
  401. // alias in the request is not recommended, and the 2 operations will be
  402. // cancelled out.
  403. repeated string version_aliases = 2 [(google.api.field_behavior) = REQUIRED];
  404. }
  405. // Request message for [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel].
  406. message ExportModelRequest {
  407. // Output configuration for the Model export.
  408. message OutputConfig {
  409. // The ID of the format in which the Model must be exported. Each Model
  410. // lists the [export formats it supports][google.cloud.aiplatform.v1.Model.supported_export_formats].
  411. // If no value is provided here, then the first from the list of the Model's
  412. // supported formats is used by default.
  413. string export_format_id = 1;
  414. // The Cloud Storage location where the Model artifact is to be
  415. // written to. Under the directory given as the destination a new one with
  416. // name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
  417. // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
  418. // will be created. Inside, the Model and any of its supporting files
  419. // will be written.
  420. // This field should only be set when the `exportableContent` field of the
  421. // [Model.supported_export_formats] object contains `ARTIFACT`.
  422. GcsDestination artifact_destination = 3;
  423. // The Google Container Registry or Artifact Registry uri where the
  424. // Model container image will be copied to.
  425. // This field should only be set when the `exportableContent` field of the
  426. // [Model.supported_export_formats] object contains `IMAGE`.
  427. ContainerRegistryDestination image_destination = 4;
  428. }
  429. // Required. The resource name of the Model to export.
  430. // The resource name may contain version id or version alias to specify the
  431. // version, if no version is specified, the default version will be exported.
  432. string name = 1 [
  433. (google.api.field_behavior) = REQUIRED,
  434. (google.api.resource_reference) = {
  435. type: "aiplatform.googleapis.com/Model"
  436. }
  437. ];
  438. // Required. The desired output location and configuration.
  439. OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
  440. }
  441. // Details of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation.
  442. message ExportModelOperationMetadata {
  443. // Further describes the output of the ExportModel. Supplements
  444. // [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1.ExportModelRequest.OutputConfig].
  445. message OutputInfo {
  446. // Output only. If the Model artifact is being exported to Google Cloud Storage this is
  447. // the full path of the directory created, into which the Model files are
  448. // being written to.
  449. string artifact_output_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  450. // Output only. If the Model image is being exported to Google Container Registry or
  451. // Artifact Registry this is the full path of the image created.
  452. string image_output_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  453. }
  454. // The common part of the operation metadata.
  455. GenericOperationMetadata generic_metadata = 1;
  456. // Output only. Information further describing the output of this Model export.
  457. OutputInfo output_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  458. }
  459. // Response message of [ModelService.ExportModel][google.cloud.aiplatform.v1.ModelService.ExportModel] operation.
  460. message ExportModelResponse {
  461. }
  462. // Request message for [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation]
  463. message ImportModelEvaluationRequest {
  464. // Required. The name of the parent model resource.
  465. // Format: `projects/{project}/locations/{location}/models/{model}`
  466. string parent = 1 [
  467. (google.api.field_behavior) = REQUIRED,
  468. (google.api.resource_reference) = {
  469. type: "aiplatform.googleapis.com/Model"
  470. }
  471. ];
  472. // Required. Model evaluation resource to be imported.
  473. ModelEvaluation model_evaluation = 2 [(google.api.field_behavior) = REQUIRED];
  474. }
  475. // Request message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
  476. message BatchImportModelEvaluationSlicesRequest {
  477. // Required. The name of the parent ModelEvaluation resource.
  478. // Format:
  479. // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
  480. string parent = 1 [
  481. (google.api.field_behavior) = REQUIRED,
  482. (google.api.resource_reference) = {
  483. type: "aiplatform.googleapis.com/ModelEvaluation"
  484. }
  485. ];
  486. // Required. Model evaluation slice resource to be imported.
  487. repeated ModelEvaluationSlice model_evaluation_slices = 2 [(google.api.field_behavior) = REQUIRED];
  488. }
  489. // Response message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
  490. message BatchImportModelEvaluationSlicesResponse {
  491. // Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
  492. repeated string imported_model_evaluation_slices = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  493. }
  494. // Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation].
  495. message GetModelEvaluationRequest {
  496. // Required. The name of the ModelEvaluation resource.
  497. // Format:
  498. // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
  499. string name = 1 [
  500. (google.api.field_behavior) = REQUIRED,
  501. (google.api.resource_reference) = {
  502. type: "aiplatform.googleapis.com/ModelEvaluation"
  503. }
  504. ];
  505. }
  506. // Request message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
  507. message ListModelEvaluationsRequest {
  508. // Required. The resource name of the Model to list the ModelEvaluations from.
  509. // Format: `projects/{project}/locations/{location}/models/{model}`
  510. string parent = 1 [
  511. (google.api.field_behavior) = REQUIRED,
  512. (google.api.resource_reference) = {
  513. type: "aiplatform.googleapis.com/Model"
  514. }
  515. ];
  516. // The standard list filter.
  517. string filter = 2;
  518. // The standard list page size.
  519. int32 page_size = 3;
  520. // The standard list page token.
  521. // Typically obtained via
  522. // [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationsResponse.next_page_token] of the previous
  523. // [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations] call.
  524. string page_token = 4;
  525. // Mask specifying which fields to read.
  526. google.protobuf.FieldMask read_mask = 5;
  527. }
  528. // Response message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1.ModelService.ListModelEvaluations].
  529. message ListModelEvaluationsResponse {
  530. // List of ModelEvaluations in the requested page.
  531. repeated ModelEvaluation model_evaluations = 1;
  532. // A token to retrieve next page of results.
  533. // Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationsRequest.page_token] to obtain that page.
  534. string next_page_token = 2;
  535. }
  536. // Request message for [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1.ModelService.GetModelEvaluationSlice].
  537. message GetModelEvaluationSliceRequest {
  538. // Required. The name of the ModelEvaluationSlice resource.
  539. // Format:
  540. // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
  541. string name = 1 [
  542. (google.api.field_behavior) = REQUIRED,
  543. (google.api.resource_reference) = {
  544. type: "aiplatform.googleapis.com/ModelEvaluationSlice"
  545. }
  546. ];
  547. }
  548. // Request message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
  549. message ListModelEvaluationSlicesRequest {
  550. // Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
  551. // from. Format:
  552. // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
  553. string parent = 1 [
  554. (google.api.field_behavior) = REQUIRED,
  555. (google.api.resource_reference) = {
  556. type: "aiplatform.googleapis.com/ModelEvaluation"
  557. }
  558. ];
  559. // The standard list filter.
  560. //
  561. // * `slice.dimension` - for =.
  562. string filter = 2;
  563. // The standard list page size.
  564. int32 page_size = 3;
  565. // The standard list page token.
  566. // Typically obtained via
  567. // [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
  568. // [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] call.
  569. string page_token = 4;
  570. // Mask specifying which fields to read.
  571. google.protobuf.FieldMask read_mask = 5;
  572. }
  573. // Response message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices].
  574. message ListModelEvaluationSlicesResponse {
  575. // List of ModelEvaluations in the requested page.
  576. repeated ModelEvaluationSlice model_evaluation_slices = 1;
  577. // A token to retrieve next page of results.
  578. // Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest.page_token] to obtain that
  579. // page.
  580. string next_page_token = 2;
  581. }