1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.cloud.aiplatform.v1beta1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/cloud/aiplatform/v1beta1/deployed_model_ref.proto"; 22import "google/cloud/aiplatform/v1beta1/encryption_spec.proto"; 23import "google/cloud/aiplatform/v1beta1/env_var.proto"; 24import "google/cloud/aiplatform/v1beta1/explanation.proto"; 25import "google/protobuf/struct.proto"; 26import "google/protobuf/timestamp.proto"; 27 28option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; 29option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; 30option java_multiple_files = true; 31option java_outer_classname = "ModelProto"; 32option java_package = "com.google.cloud.aiplatform.v1beta1"; 33option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; 34option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; 35 36// A trained machine learning Model. 37message Model { 38 option (google.api.resource) = { 39 type: "aiplatform.googleapis.com/Model" 40 pattern: "projects/{project}/locations/{location}/models/{model}" 41 }; 42 43 // Represents export format supported by the Model. 44 // All formats export to Google Cloud Storage. 45 message ExportFormat { 46 // The Model content that can be exported. 47 enum ExportableContent { 48 // Should not be used. 49 EXPORTABLE_CONTENT_UNSPECIFIED = 0; 50 51 // Model artifact and any of its supported files. Will be exported to the 52 // location specified by the `artifactDestination` field of the 53 // [ExportModelRequest.output_config][google.cloud.aiplatform.v1beta1.ExportModelRequest.output_config] 54 // object. 55 ARTIFACT = 1; 56 57 // The container image that is to be used when deploying this Model. Will 58 // be exported to the location specified by the `imageDestination` field 59 // of the 60 // [ExportModelRequest.output_config][google.cloud.aiplatform.v1beta1.ExportModelRequest.output_config] 61 // object. 62 IMAGE = 2; 63 } 64 65 // Output only. The ID of the export format. 66 // The possible format IDs are: 67 // 68 // * `tflite` 69 // Used for Android mobile devices. 70 // 71 // * `edgetpu-tflite` 72 // Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices. 73 // 74 // * `tf-saved-model` 75 // A tensorflow model in SavedModel format. 76 // 77 // * `tf-js` 78 // A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used 79 // in the browser and in Node.js using JavaScript. 80 // 81 // * `core-ml` 82 // Used for iOS mobile devices. 83 // 84 // * `custom-trained` 85 // A Model that was uploaded or trained by custom code. 86 string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 87 88 // Output only. The content of this Model that may be exported. 89 repeated ExportableContent exportable_contents = 2 90 [(google.api.field_behavior) = OUTPUT_ONLY]; 91 } 92 93 // Contains information about the original Model if this Model is a copy. 94 message OriginalModelInfo { 95 // Output only. The resource name of the Model this Model is a copy of, 96 // including the revision. Format: 97 // `projects/{project}/locations/{location}/models/{model_id}@{version_id}` 98 string model = 1 [ 99 (google.api.field_behavior) = OUTPUT_ONLY, 100 (google.api.resource_reference) = { 101 type: "aiplatform.googleapis.com/Model" 102 } 103 ]; 104 } 105 106 // Identifies a type of Model's prediction resources. 107 enum DeploymentResourcesType { 108 // Should not be used. 109 DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0; 110 111 // Resources that are dedicated to the 112 // [DeployedModel][google.cloud.aiplatform.v1beta1.DeployedModel], and that 113 // need a higher degree of manual configuration. 114 DEDICATED_RESOURCES = 1; 115 116 // Resources that to large degree are decided by Vertex AI, and require 117 // only a modest additional configuration. 118 AUTOMATIC_RESOURCES = 2; 119 120 // Resources that can be shared by multiple 121 // [DeployedModels][google.cloud.aiplatform.v1beta1.DeployedModel]. A 122 // pre-configured 123 // [DeploymentResourcePool][google.cloud.aiplatform.v1beta1.DeploymentResourcePool] 124 // is required. 125 SHARED_RESOURCES = 3; 126 } 127 128 // The resource name of the Model. 129 string name = 1; 130 131 // Output only. Immutable. The version ID of the model. 132 // A new version is committed when a new model version is uploaded or 133 // trained under an existing model id. It is an auto-incrementing decimal 134 // number in string representation. 135 string version_id = 28 [ 136 (google.api.field_behavior) = IMMUTABLE, 137 (google.api.field_behavior) = OUTPUT_ONLY 138 ]; 139 140 // User provided version aliases so that a model version can be referenced via 141 // alias (i.e. 142 // `projects/{project}/locations/{location}/models/{model_id}@{version_alias}` 143 // instead of auto-generated version id (i.e. 144 // `projects/{project}/locations/{location}/models/{model_id}@{version_id})`. 145 // The format is [a-z][a-zA-Z0-9-]{0,126}[a-z0-9] to distinguish from 146 // version_id. A default version alias will be created for the first version 147 // of the model, and there must be exactly one default version alias for a 148 // model. 149 repeated string version_aliases = 29; 150 151 // Output only. Timestamp when this version was created. 152 google.protobuf.Timestamp version_create_time = 31 153 [(google.api.field_behavior) = OUTPUT_ONLY]; 154 155 // Output only. Timestamp when this version was most recently updated. 156 google.protobuf.Timestamp version_update_time = 32 157 [(google.api.field_behavior) = OUTPUT_ONLY]; 158 159 // Required. The display name of the Model. 160 // The name can be up to 128 characters long and can consist of any UTF-8 161 // characters. 162 string display_name = 2 [(google.api.field_behavior) = REQUIRED]; 163 164 // The description of the Model. 165 string description = 3; 166 167 // The description of this version. 168 string version_description = 30; 169 170 // The schemata that describe formats of the Model's predictions and 171 // explanations as given and returned via 172 // [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] 173 // and 174 // [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain]. 175 PredictSchemata predict_schemata = 4; 176 177 // Immutable. Points to a YAML file stored on Google Cloud Storage describing 178 // additional information about the Model, that is specific to it. Unset if 179 // the Model does not have any additional information. The schema is defined 180 // as an OpenAPI 3.0.2 [Schema 181 // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 182 // AutoML Models always have this field populated by Vertex AI, if no 183 // additional metadata is needed, this field is set to an empty string. 184 // Note: The URI given on output will be immutable and probably different, 185 // including the URI scheme, than the one given on input. The output URI will 186 // point to a location where the user only has a read access. 187 string metadata_schema_uri = 5 [(google.api.field_behavior) = IMMUTABLE]; 188 189 // Immutable. An additional information about the Model; the schema of the 190 // metadata can be found in 191 // [metadata_schema][google.cloud.aiplatform.v1beta1.Model.metadata_schema_uri]. 192 // Unset if the Model does not have any additional information. 193 google.protobuf.Value metadata = 6 [(google.api.field_behavior) = IMMUTABLE]; 194 195 // Output only. The formats in which this Model may be exported. If empty, 196 // this Model is not available for export. 197 repeated ExportFormat supported_export_formats = 20 198 [(google.api.field_behavior) = OUTPUT_ONLY]; 199 200 // Output only. The resource name of the TrainingPipeline that uploaded this 201 // Model, if any. 202 string training_pipeline = 7 [ 203 (google.api.field_behavior) = OUTPUT_ONLY, 204 (google.api.resource_reference) = { 205 type: "aiplatform.googleapis.com/TrainingPipeline" 206 } 207 ]; 208 209 // Input only. The specification of the container that is to be used when 210 // deploying this Model. The specification is ingested upon 211 // [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel], 212 // and all binaries it contains are copied and stored internally by Vertex AI. 213 // Not present for AutoML Models or Large Models. 214 ModelContainerSpec container_spec = 9 215 [(google.api.field_behavior) = INPUT_ONLY]; 216 217 // Immutable. The path to the directory containing the Model artifact and any 218 // of its supporting files. Not present for AutoML Models or Large Models. 219 string artifact_uri = 26 [(google.api.field_behavior) = IMMUTABLE]; 220 221 // Output only. When this Model is deployed, its prediction resources are 222 // described by the `prediction_resources` field of the 223 // [Endpoint.deployed_models][google.cloud.aiplatform.v1beta1.Endpoint.deployed_models] 224 // object. Because not all Models support all resource configuration types, 225 // the configuration types this Model supports are listed here. If no 226 // configuration types are listed, the Model cannot be deployed to an 227 // [Endpoint][google.cloud.aiplatform.v1beta1.Endpoint] and does not support 228 // online predictions 229 // ([PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] 230 // or 231 // [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain]). 232 // Such a Model can serve predictions by using a 233 // [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob], 234 // if it has at least one entry each in 235 // [supported_input_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_input_storage_formats] 236 // and 237 // [supported_output_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_output_storage_formats]. 238 repeated DeploymentResourcesType supported_deployment_resources_types = 10 239 [(google.api.field_behavior) = OUTPUT_ONLY]; 240 241 // Output only. The formats this Model supports in 242 // [BatchPredictionJob.input_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.input_config]. 243 // If 244 // [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri] 245 // exists, the instances should be given as per that schema. 246 // 247 // The possible formats are: 248 // 249 // * `jsonl` 250 // The JSON Lines format, where each instance is a single line. Uses 251 // [GcsSource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.gcs_source]. 252 // 253 // * `csv` 254 // The CSV format, where each instance is a single comma-separated line. 255 // The first line in the file is the header, containing comma-separated field 256 // names. Uses 257 // [GcsSource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.gcs_source]. 258 // 259 // * `tf-record` 260 // The TFRecord format, where each instance is a single record in tfrecord 261 // syntax. Uses 262 // [GcsSource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.gcs_source]. 263 // 264 // * `tf-record-gzip` 265 // Similar to `tf-record`, but the file is gzipped. Uses 266 // [GcsSource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.gcs_source]. 267 // 268 // * `bigquery` 269 // Each instance is a single row in BigQuery. Uses 270 // [BigQuerySource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.bigquery_source]. 271 // 272 // * `file-list` 273 // Each line of the file is the location of an instance to process, uses 274 // `gcs_source` field of the 275 // [InputConfig][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig] 276 // object. 277 // 278 // 279 // If this Model doesn't support any of these formats it means it cannot be 280 // used with a 281 // [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. 282 // However, if it has 283 // [supported_deployment_resources_types][google.cloud.aiplatform.v1beta1.Model.supported_deployment_resources_types], 284 // it could serve online predictions by using 285 // [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] 286 // or 287 // [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain]. 288 repeated string supported_input_storage_formats = 11 289 [(google.api.field_behavior) = OUTPUT_ONLY]; 290 291 // Output only. The formats this Model supports in 292 // [BatchPredictionJob.output_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.output_config]. 293 // If both 294 // [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri] 295 // and 296 // [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.prediction_schema_uri] 297 // exist, the predictions are returned together with their instances. In other 298 // words, the prediction has the original instance data first, followed by the 299 // actual prediction content (as per the schema). 300 // 301 // The possible formats are: 302 // 303 // * `jsonl` 304 // The JSON Lines format, where each prediction is a single line. Uses 305 // [GcsDestination][google.cloud.aiplatform.v1beta1.BatchPredictionJob.OutputConfig.gcs_destination]. 306 // 307 // * `csv` 308 // The CSV format, where each prediction is a single comma-separated line. 309 // The first line in the file is the header, containing comma-separated field 310 // names. Uses 311 // [GcsDestination][google.cloud.aiplatform.v1beta1.BatchPredictionJob.OutputConfig.gcs_destination]. 312 // 313 // * `bigquery` 314 // Each prediction is a single row in a BigQuery table, uses 315 // [BigQueryDestination][google.cloud.aiplatform.v1beta1.BatchPredictionJob.OutputConfig.bigquery_destination] 316 // . 317 // 318 // 319 // If this Model doesn't support any of these formats it means it cannot be 320 // used with a 321 // [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. 322 // However, if it has 323 // [supported_deployment_resources_types][google.cloud.aiplatform.v1beta1.Model.supported_deployment_resources_types], 324 // it could serve online predictions by using 325 // [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] 326 // or 327 // [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain]. 328 repeated string supported_output_storage_formats = 12 329 [(google.api.field_behavior) = OUTPUT_ONLY]; 330 331 // Output only. Timestamp when this Model was uploaded into Vertex AI. 332 google.protobuf.Timestamp create_time = 13 333 [(google.api.field_behavior) = OUTPUT_ONLY]; 334 335 // Output only. Timestamp when this Model was most recently updated. 336 google.protobuf.Timestamp update_time = 14 337 [(google.api.field_behavior) = OUTPUT_ONLY]; 338 339 // Output only. The pointers to DeployedModels created from this Model. Note 340 // that Model could have been deployed to Endpoints in different Locations. 341 repeated DeployedModelRef deployed_models = 15 342 [(google.api.field_behavior) = OUTPUT_ONLY]; 343 344 // The default explanation specification for this Model. 345 // 346 // The Model can be used for 347 // [requesting 348 // explanation][google.cloud.aiplatform.v1beta1.PredictionService.Explain] 349 // after being 350 // [deployed][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel] if 351 // it is populated. The Model can be used for [batch 352 // explanation][google.cloud.aiplatform.v1beta1.BatchPredictionJob.generate_explanation] 353 // if it is populated. 354 // 355 // All fields of the explanation_spec can be overridden by 356 // [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] 357 // of 358 // [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1beta1.DeployModelRequest.deployed_model], 359 // or 360 // [explanation_spec][google.cloud.aiplatform.v1beta1.BatchPredictionJob.explanation_spec] 361 // of 362 // [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. 363 // 364 // If the default explanation specification is not set for this Model, this 365 // Model can still be used for 366 // [requesting 367 // explanation][google.cloud.aiplatform.v1beta1.PredictionService.Explain] by 368 // setting 369 // [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] 370 // of 371 // [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1beta1.DeployModelRequest.deployed_model] 372 // and for [batch 373 // explanation][google.cloud.aiplatform.v1beta1.BatchPredictionJob.generate_explanation] 374 // by setting 375 // [explanation_spec][google.cloud.aiplatform.v1beta1.BatchPredictionJob.explanation_spec] 376 // of 377 // [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. 378 ExplanationSpec explanation_spec = 23; 379 380 // Used to perform consistent read-modify-write updates. If not set, a blind 381 // "overwrite" update happens. 382 string etag = 16; 383 384 // The labels with user-defined metadata to organize your Models. 385 // 386 // Label keys and values can be no longer than 64 characters 387 // (Unicode codepoints), can only contain lowercase letters, numeric 388 // characters, underscores and dashes. International characters are allowed. 389 // 390 // See https://goo.gl/xmQnxf for more information and examples of labels. 391 map<string, string> labels = 17; 392 393 // Customer-managed encryption key spec for a Model. If set, this 394 // Model and all sub-resources of this Model will be secured by this key. 395 EncryptionSpec encryption_spec = 24; 396 397 // Output only. Source of a model. It can either be automl training pipeline, 398 // custom training pipeline, BigQuery ML, or existing Vertex AI Model. 399 ModelSourceInfo model_source_info = 38 400 [(google.api.field_behavior) = OUTPUT_ONLY]; 401 402 // Output only. If this Model is a copy of another Model, this contains info 403 // about the original. 404 OriginalModelInfo original_model_info = 34 405 [(google.api.field_behavior) = OUTPUT_ONLY]; 406 407 // Output only. The resource name of the Artifact that was created in 408 // MetadataStore when creating the Model. The Artifact resource name pattern 409 // is 410 // `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`. 411 string metadata_artifact = 44 [(google.api.field_behavior) = OUTPUT_ONLY]; 412} 413 414// Contains information about the Large Model. 415message LargeModelReference { 416 // Required. The unique name of the large Foundation or pre-built model. Like 417 // "chat-panda", "text-panda". Or model name with version ID, like 418 // "chat-panda-001", "text-panda-005", etc. 419 string name = 1 [(google.api.field_behavior) = REQUIRED]; 420} 421 422// Contains the schemata used in Model's predictions and explanations via 423// [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict], 424// [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain] 425// and [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. 426message PredictSchemata { 427 // Immutable. Points to a YAML file stored on Google Cloud Storage describing 428 // the format of a single instance, which are used in 429 // [PredictRequest.instances][google.cloud.aiplatform.v1beta1.PredictRequest.instances], 430 // [ExplainRequest.instances][google.cloud.aiplatform.v1beta1.ExplainRequest.instances] 431 // and 432 // [BatchPredictionJob.input_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.input_config]. 433 // The schema is defined as an OpenAPI 3.0.2 [Schema 434 // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 435 // AutoML Models always have this field populated by Vertex AI. 436 // Note: The URI given on output will be immutable and probably different, 437 // including the URI scheme, than the one given on input. The output URI will 438 // point to a location where the user only has a read access. 439 string instance_schema_uri = 1 [(google.api.field_behavior) = IMMUTABLE]; 440 441 // Immutable. Points to a YAML file stored on Google Cloud Storage describing 442 // the parameters of prediction and explanation via 443 // [PredictRequest.parameters][google.cloud.aiplatform.v1beta1.PredictRequest.parameters], 444 // [ExplainRequest.parameters][google.cloud.aiplatform.v1beta1.ExplainRequest.parameters] 445 // and 446 // [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model_parameters]. 447 // The schema is defined as an OpenAPI 3.0.2 [Schema 448 // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 449 // AutoML Models always have this field populated by Vertex AI, if no 450 // parameters are supported, then it is set to an empty string. 451 // Note: The URI given on output will be immutable and probably different, 452 // including the URI scheme, than the one given on input. The output URI will 453 // point to a location where the user only has a read access. 454 string parameters_schema_uri = 2 [(google.api.field_behavior) = IMMUTABLE]; 455 456 // Immutable. Points to a YAML file stored on Google Cloud Storage describing 457 // the format of a single prediction produced by this Model, which are 458 // returned via 459 // [PredictResponse.predictions][google.cloud.aiplatform.v1beta1.PredictResponse.predictions], 460 // [ExplainResponse.explanations][google.cloud.aiplatform.v1beta1.ExplainResponse.explanations], 461 // and 462 // [BatchPredictionJob.output_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.output_config]. 463 // The schema is defined as an OpenAPI 3.0.2 [Schema 464 // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 465 // AutoML Models always have this field populated by Vertex AI. 466 // Note: The URI given on output will be immutable and probably different, 467 // including the URI scheme, than the one given on input. The output URI will 468 // point to a location where the user only has a read access. 469 string prediction_schema_uri = 3 [(google.api.field_behavior) = IMMUTABLE]; 470} 471 472// Specification of a container for serving predictions. Some fields in this 473// message correspond to fields in the [Kubernetes Container v1 core 474// specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). 475message ModelContainerSpec { 476 // Required. Immutable. URI of the Docker image to be used as the custom 477 // container for serving predictions. This URI must identify an image in 478 // Artifact Registry or Container Registry. Learn more about the [container 479 // publishing 480 // requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), 481 // including permissions requirements for the Vertex AI Service Agent. 482 // 483 // The container image is ingested upon 484 // [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel], 485 // stored internally, and this original path is afterwards not used. 486 // 487 // To learn about the requirements for the Docker image itself, see 488 // [Custom container 489 // requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). 490 // 491 // You can use the URI to one of Vertex AI's [pre-built container images for 492 // prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) 493 // in this field. 494 string image_uri = 1 [ 495 (google.api.field_behavior) = REQUIRED, 496 (google.api.field_behavior) = IMMUTABLE 497 ]; 498 499 // Immutable. Specifies the command that runs when the container starts. This 500 // overrides the container's 501 // [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). 502 // Specify this field as an array of executable and arguments, similar to a 503 // Docker `ENTRYPOINT`'s "exec" form, not its "shell" form. 504 // 505 // If you do not specify this field, then the container's `ENTRYPOINT` runs, 506 // in conjunction with the 507 // [args][google.cloud.aiplatform.v1beta1.ModelContainerSpec.args] field or 508 // the container's 509 // [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), if either 510 // exists. If this field is not specified and the container does not have an 511 // `ENTRYPOINT`, then refer to the Docker documentation about [how `CMD` and 512 // `ENTRYPOINT` 513 // interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). 514 // 515 // If you specify this field, then you can also specify the `args` field to 516 // provide additional arguments for this command. However, if you specify this 517 // field, then the container's `CMD` is ignored. See the 518 // [Kubernetes documentation about how the 519 // `command` and `args` fields interact with a container's `ENTRYPOINT` and 520 // `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). 521 // 522 // In this field, you can reference [environment variables set by Vertex 523 // AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) 524 // and environment variables set in the 525 // [env][google.cloud.aiplatform.v1beta1.ModelContainerSpec.env] field. You 526 // cannot reference environment variables set in the Docker image. In order 527 // for environment variables to be expanded, reference them by using the 528 // following syntax: 529 // <code>$(<var>VARIABLE_NAME</var>)</code> 530 // Note that this differs from Bash variable expansion, which does not use 531 // parentheses. If a variable cannot be resolved, the reference in the input 532 // string is used unchanged. To avoid variable expansion, you can escape this 533 // syntax with `$$`; for example: 534 // <code>$$(<var>VARIABLE_NAME</var>)</code> 535 // This field corresponds to the `command` field of the Kubernetes Containers 536 // [v1 core 537 // API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). 538 repeated string command = 2 [(google.api.field_behavior) = IMMUTABLE]; 539 540 // Immutable. Specifies arguments for the command that runs when the container 541 // starts. This overrides the container's 542 // [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify 543 // this field as an array of executable and arguments, similar to a Docker 544 // `CMD`'s "default parameters" form. 545 // 546 // If you don't specify this field but do specify the 547 // [command][google.cloud.aiplatform.v1beta1.ModelContainerSpec.command] 548 // field, then the command from the `command` field runs without any 549 // additional arguments. See the [Kubernetes documentation about how the 550 // `command` and `args` fields interact with a container's `ENTRYPOINT` and 551 // `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). 552 // 553 // If you don't specify this field and don't specify the `command` field, 554 // then the container's 555 // [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and 556 // `CMD` determine what runs based on their default behavior. See the Docker 557 // documentation about [how `CMD` and `ENTRYPOINT` 558 // interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). 559 // 560 // In this field, you can reference [environment variables 561 // set by Vertex 562 // AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) 563 // and environment variables set in the 564 // [env][google.cloud.aiplatform.v1beta1.ModelContainerSpec.env] field. You 565 // cannot reference environment variables set in the Docker image. In order 566 // for environment variables to be expanded, reference them by using the 567 // following syntax: 568 // <code>$(<var>VARIABLE_NAME</var>)</code> 569 // Note that this differs from Bash variable expansion, which does not use 570 // parentheses. If a variable cannot be resolved, the reference in the input 571 // string is used unchanged. To avoid variable expansion, you can escape this 572 // syntax with `$$`; for example: 573 // <code>$$(<var>VARIABLE_NAME</var>)</code> 574 // This field corresponds to the `args` field of the Kubernetes Containers 575 // [v1 core 576 // API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). 577 repeated string args = 3 [(google.api.field_behavior) = IMMUTABLE]; 578 579 // Immutable. List of environment variables to set in the container. After the 580 // container starts running, code running in the container can read these 581 // environment variables. 582 // 583 // Additionally, the 584 // [command][google.cloud.aiplatform.v1beta1.ModelContainerSpec.command] and 585 // [args][google.cloud.aiplatform.v1beta1.ModelContainerSpec.args] fields can 586 // reference these variables. Later entries in this list can also reference 587 // earlier entries. For example, the following example sets the variable 588 // `VAR_2` to have the value `foo bar`: 589 // 590 // ```json 591 // [ 592 // { 593 // "name": "VAR_1", 594 // "value": "foo" 595 // }, 596 // { 597 // "name": "VAR_2", 598 // "value": "$(VAR_1) bar" 599 // } 600 // ] 601 // ``` 602 // 603 // If you switch the order of the variables in the example, then the expansion 604 // does not occur. 605 // 606 // This field corresponds to the `env` field of the Kubernetes Containers 607 // [v1 core 608 // API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). 609 repeated EnvVar env = 4 [(google.api.field_behavior) = IMMUTABLE]; 610 611 // Immutable. List of ports to expose from the container. Vertex AI sends any 612 // prediction requests that it receives to the first port on this list. Vertex 613 // AI also sends 614 // [liveness and health 615 // checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) 616 // to this port. 617 // 618 // If you do not specify this field, it defaults to following value: 619 // 620 // ```json 621 // [ 622 // { 623 // "containerPort": 8080 624 // } 625 // ] 626 // ``` 627 // 628 // Vertex AI does not use ports other than the first one listed. This field 629 // corresponds to the `ports` field of the Kubernetes Containers 630 // [v1 core 631 // API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). 632 repeated Port ports = 5 [(google.api.field_behavior) = IMMUTABLE]; 633 634 // Immutable. HTTP path on the container to send prediction requests to. 635 // Vertex AI forwards requests sent using 636 // [projects.locations.endpoints.predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] 637 // to this path on the container's IP address and port. Vertex AI then returns 638 // the container's response in the API response. 639 // 640 // For example, if you set this field to `/foo`, then when Vertex AI 641 // receives a prediction request, it forwards the request body in a POST 642 // request to the `/foo` path on the port of your container specified by the 643 // first value of this `ModelContainerSpec`'s 644 // [ports][google.cloud.aiplatform.v1beta1.ModelContainerSpec.ports] field. 645 // 646 // If you don't specify this field, it defaults to the following value when 647 // you [deploy this Model to an 648 // Endpoint][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel]: 649 // <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code> 650 // The placeholders in this value are replaced as follows: 651 // 652 // * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the 653 // Endpoint.name][] field of the Endpoint where this Model has been 654 // deployed. (Vertex AI makes this value available to your container code 655 // as the [`AIP_ENDPOINT_ID` environment 656 // variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) 657 // 658 // * <var>DEPLOYED_MODEL</var>: 659 // [DeployedModel.id][google.cloud.aiplatform.v1beta1.DeployedModel.id] of the 660 // `DeployedModel`. 661 // (Vertex AI makes this value available to your container code 662 // as the [`AIP_DEPLOYED_MODEL_ID` environment 663 // variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) 664 string predict_route = 6 [(google.api.field_behavior) = IMMUTABLE]; 665 666 // Immutable. HTTP path on the container to send health checks to. Vertex AI 667 // intermittently sends GET requests to this path on the container's IP 668 // address and port to check that the container is healthy. Read more about 669 // [health 670 // checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 671 // 672 // For example, if you set this field to `/bar`, then Vertex AI 673 // intermittently sends a GET request to the `/bar` path on the port of your 674 // container specified by the first value of this `ModelContainerSpec`'s 675 // [ports][google.cloud.aiplatform.v1beta1.ModelContainerSpec.ports] field. 676 // 677 // If you don't specify this field, it defaults to the following value when 678 // you [deploy this Model to an 679 // Endpoint][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel]: 680 // <code>/v1/endpoints/<var>ENDPOINT</var>/deployedModels/<var>DEPLOYED_MODEL</var>:predict</code> 681 // The placeholders in this value are replaced as follows: 682 // 683 // * <var>ENDPOINT</var>: The last segment (following `endpoints/`)of the 684 // Endpoint.name][] field of the Endpoint where this Model has been 685 // deployed. (Vertex AI makes this value available to your container code 686 // as the [`AIP_ENDPOINT_ID` environment 687 // variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) 688 // 689 // * <var>DEPLOYED_MODEL</var>: 690 // [DeployedModel.id][google.cloud.aiplatform.v1beta1.DeployedModel.id] of the 691 // `DeployedModel`. 692 // (Vertex AI makes this value available to your container code as the 693 // [`AIP_DEPLOYED_MODEL_ID` environment 694 // variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) 695 string health_route = 7 [(google.api.field_behavior) = IMMUTABLE]; 696} 697 698// Represents a network port in a container. 699message Port { 700 // The number of the port to expose on the pod's IP address. 701 // Must be a valid port number, between 1 and 65535 inclusive. 702 int32 container_port = 3; 703} 704 705// Detail description of the source information of the model. 706message ModelSourceInfo { 707 // Source of the model. 708 enum ModelSourceType { 709 // Should not be used. 710 MODEL_SOURCE_TYPE_UNSPECIFIED = 0; 711 712 // The Model is uploaded by automl training pipeline. 713 AUTOML = 1; 714 715 // The Model is uploaded by user or custom training pipeline. 716 CUSTOM = 2; 717 718 // The Model is registered and sync'ed from BigQuery ML. 719 BQML = 3; 720 721 // The Model is saved or tuned from Model Garden. 722 MODEL_GARDEN = 4; 723 724 // The Model is saved or tuned from Genie. 725 GENIE = 5; 726 } 727 728 // Type of the model source. 729 ModelSourceType source_type = 1; 730 731 // If this Model is copy of another Model. If true then 732 // [source_type][google.cloud.aiplatform.v1beta1.ModelSourceInfo.source_type] 733 // pertains to the original. 734 bool copy = 2; 735} 736