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/artifact.proto"; 22import "google/cloud/aiplatform/v1beta1/context.proto"; 23import "google/cloud/aiplatform/v1beta1/encryption_spec.proto"; 24import "google/cloud/aiplatform/v1beta1/execution.proto"; 25import "google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto"; 26import "google/cloud/aiplatform/v1beta1/pipeline_state.proto"; 27import "google/cloud/aiplatform/v1beta1/value.proto"; 28import "google/protobuf/struct.proto"; 29import "google/protobuf/timestamp.proto"; 30import "google/rpc/status.proto"; 31 32option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; 33option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; 34option java_multiple_files = true; 35option java_outer_classname = "Pipeline"; 36option java_package = "com.google.cloud.aiplatform.v1beta1"; 37option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; 38option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; 39option (google.api.resource_definition) = { 40 type: "compute.googleapis.com/Network" 41 pattern: "projects/{project}/global/networks/{network}" 42}; 43 44// An instance of a machine learning PipelineJob. 45message PipelineJob { 46 option (google.api.resource) = { 47 type: "aiplatform.googleapis.com/PipelineJob" 48 pattern: "projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}" 49 }; 50 51 // The runtime config of a PipelineJob. 52 message RuntimeConfig { 53 // The type of an input artifact. 54 message InputArtifact { 55 oneof kind { 56 // Artifact resource id from MLMD. Which is the last portion of an 57 // artifact resource name: 58 // `projects/{project}/locations/{location}/metadataStores/default/artifacts/{artifact_id}`. 59 // The artifact must stay within the same project, location and default 60 // metadatastore as the pipeline. 61 string artifact_id = 1; 62 } 63 } 64 65 // Deprecated. Use 66 // [RuntimeConfig.parameter_values][google.cloud.aiplatform.v1beta1.PipelineJob.RuntimeConfig.parameter_values] 67 // instead. The runtime parameters of the PipelineJob. The parameters will 68 // be passed into 69 // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec] 70 // to replace the placeholders at runtime. This field is used by pipelines 71 // built using `PipelineJob.pipeline_spec.schema_version` 2.0.0 or lower, 72 // such as pipelines built using Kubeflow Pipelines SDK 1.8 or lower. 73 map<string, Value> parameters = 1 [deprecated = true]; 74 75 // Required. A path in a Cloud Storage bucket, which will be treated as the 76 // root output directory of the pipeline. It is used by the system to 77 // generate the paths of output artifacts. The artifact paths are generated 78 // with a sub-path pattern `{job_id}/{task_id}/{output_key}` under the 79 // specified output directory. The service account specified in this 80 // pipeline must have the `storage.objects.get` and `storage.objects.create` 81 // permissions for this bucket. 82 string gcs_output_directory = 2 [(google.api.field_behavior) = REQUIRED]; 83 84 // The runtime parameters of the PipelineJob. The parameters will be 85 // passed into 86 // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec] 87 // to replace the placeholders at runtime. This field is used by pipelines 88 // built using `PipelineJob.pipeline_spec.schema_version` 2.1.0, such as 89 // pipelines built using Kubeflow Pipelines SDK 1.9 or higher and the v2 90 // DSL. 91 map<string, google.protobuf.Value> parameter_values = 3; 92 93 // Represents the failure policy of a pipeline. Currently, the default of a 94 // pipeline is that the pipeline will continue to run until no more tasks 95 // can be executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. 96 // However, if a pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it 97 // will stop scheduling any new tasks when a task has failed. Any scheduled 98 // tasks will continue to completion. 99 PipelineFailurePolicy failure_policy = 4; 100 101 // The runtime artifacts of the PipelineJob. The key will be the input 102 // artifact name and the value would be one of the InputArtifact. 103 map<string, InputArtifact> input_artifacts = 5; 104 } 105 106 // Output only. The resource name of the PipelineJob. 107 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 108 109 // The display name of the Pipeline. 110 // The name can be up to 128 characters long and can consist of any UTF-8 111 // characters. 112 string display_name = 2; 113 114 // Output only. Pipeline creation time. 115 google.protobuf.Timestamp create_time = 3 116 [(google.api.field_behavior) = OUTPUT_ONLY]; 117 118 // Output only. Pipeline start time. 119 google.protobuf.Timestamp start_time = 4 120 [(google.api.field_behavior) = OUTPUT_ONLY]; 121 122 // Output only. Pipeline end time. 123 google.protobuf.Timestamp end_time = 5 124 [(google.api.field_behavior) = OUTPUT_ONLY]; 125 126 // Output only. Timestamp when this PipelineJob was most recently updated. 127 google.protobuf.Timestamp update_time = 6 128 [(google.api.field_behavior) = OUTPUT_ONLY]; 129 130 // The spec of the pipeline. 131 google.protobuf.Struct pipeline_spec = 7; 132 133 // Output only. The detailed state of the job. 134 PipelineState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 135 136 // Output only. The details of pipeline run. Not available in the list view. 137 PipelineJobDetail job_detail = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 138 139 // Output only. The error that occurred during pipeline execution. 140 // Only populated when the pipeline's state is FAILED or CANCELLED. 141 google.rpc.Status error = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 142 143 // The labels with user-defined metadata to organize PipelineJob. 144 // 145 // Label keys and values can be no longer than 64 characters 146 // (Unicode codepoints), can only contain lowercase letters, numeric 147 // characters, underscores and dashes. International characters are allowed. 148 // 149 // See https://goo.gl/xmQnxf for more information and examples of labels. 150 // 151 // Note there is some reserved label key for Vertex AI Pipelines. 152 // - `vertex-ai-pipelines-run-billing-id`, user set value will get overrided. 153 map<string, string> labels = 11; 154 155 // Runtime config of the pipeline. 156 RuntimeConfig runtime_config = 12; 157 158 // Customer-managed encryption key spec for a pipelineJob. If set, this 159 // PipelineJob and all of its sub-resources will be secured by this key. 160 EncryptionSpec encryption_spec = 16; 161 162 // The service account that the pipeline workload runs as. 163 // If not specified, the Compute Engine default service account in the project 164 // will be used. 165 // See 166 // https://cloud.google.com/compute/docs/access/service-accounts#default_service_account 167 // 168 // Users starting the pipeline must have the `iam.serviceAccounts.actAs` 169 // permission on this service account. 170 string service_account = 17; 171 172 // The full name of the Compute Engine 173 // [network](/compute/docs/networks-and-firewalls#networks) to which the 174 // Pipeline Job's workload should be peered. For example, 175 // `projects/12345/global/networks/myVPC`. 176 // [Format](/compute/docs/reference/rest/v1/networks/insert) 177 // is of the form `projects/{project}/global/networks/{network}`. 178 // Where {project} is a project number, as in `12345`, and {network} is a 179 // network name. 180 // 181 // Private services access must already be configured for the network. 182 // Pipeline job will apply the network configuration to the Google Cloud 183 // resources being launched, if applied, such as Vertex AI 184 // Training or Dataflow job. If left unspecified, the workload is not peered 185 // with any network. 186 string network = 18 [ 187 (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } 188 ]; 189 190 // A list of names for the reserved ip ranges under the VPC network 191 // that can be used for this Pipeline Job's workload. 192 // 193 // If set, we will deploy the Pipeline Job's workload within the provided ip 194 // ranges. Otherwise, the job will be deployed to any ip ranges under the 195 // provided VPC network. 196 // 197 // Example: ['vertex-ai-ip-range']. 198 repeated string reserved_ip_ranges = 25; 199 200 // A template uri from where the 201 // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec], 202 // if empty, will be downloaded. Currently, only uri from Vertex Template 203 // Registry & Gallery is supported. Reference to 204 // https://cloud.google.com/vertex-ai/docs/pipelines/create-pipeline-template. 205 string template_uri = 19; 206 207 // Output only. Pipeline template metadata. Will fill up fields if 208 // [PipelineJob.template_uri][google.cloud.aiplatform.v1beta1.PipelineJob.template_uri] 209 // is from supported template registry. 210 PipelineTemplateMetadata template_metadata = 20 211 [(google.api.field_behavior) = OUTPUT_ONLY]; 212 213 // Output only. The schedule resource name. 214 // Only returned if the Pipeline is created by Schedule API. 215 string schedule_name = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; 216 217 // Optional. Whether to do component level validations before job creation. 218 bool preflight_validations = 26 [(google.api.field_behavior) = OPTIONAL]; 219} 220 221// Pipeline template metadata if 222// [PipelineJob.template_uri][google.cloud.aiplatform.v1beta1.PipelineJob.template_uri] 223// is from supported template registry. Currently, the only supported registry 224// is Artifact Registry. 225message PipelineTemplateMetadata { 226 // The version_name in artifact registry. 227 // 228 // Will always be presented in output if the 229 // [PipelineJob.template_uri][google.cloud.aiplatform.v1beta1.PipelineJob.template_uri] 230 // is from supported template registry. 231 // 232 // Format is "sha256:abcdef123456...". 233 string version = 3; 234} 235 236// The runtime detail of PipelineJob. 237message PipelineJobDetail { 238 // Output only. The context of the pipeline. 239 Context pipeline_context = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 240 241 // Output only. The context of the current pipeline run. 242 Context pipeline_run_context = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 243 244 // Output only. The runtime details of the tasks under the pipeline. 245 repeated PipelineTaskDetail task_details = 3 246 [(google.api.field_behavior) = OUTPUT_ONLY]; 247} 248 249// The runtime detail of a task execution. 250message PipelineTaskDetail { 251 // A single record of the task status. 252 message PipelineTaskStatus { 253 // Output only. Update time of this status. 254 google.protobuf.Timestamp update_time = 1 255 [(google.api.field_behavior) = OUTPUT_ONLY]; 256 257 // Output only. The state of the task. 258 State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 259 260 // Output only. The error that occurred during the state. May be set when 261 // the state is any of the non-final state (PENDING/RUNNING/CANCELLING) or 262 // FAILED state. If the state is FAILED, the error here is final and not 263 // going to be retried. If the state is a non-final state, the error 264 // indicates a system-error being retried. 265 google.rpc.Status error = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 266 } 267 268 // A list of artifact metadata. 269 message ArtifactList { 270 // Output only. A list of artifact metadata. 271 repeated Artifact artifacts = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 272 } 273 274 // Specifies state of TaskExecution 275 enum State { 276 // Unspecified. 277 STATE_UNSPECIFIED = 0; 278 279 // Specifies pending state for the task. 280 PENDING = 1; 281 282 // Specifies task is being executed. 283 RUNNING = 2; 284 285 // Specifies task completed successfully. 286 SUCCEEDED = 3; 287 288 // Specifies Task cancel is in pending state. 289 CANCEL_PENDING = 4; 290 291 // Specifies task is being cancelled. 292 CANCELLING = 5; 293 294 // Specifies task was cancelled. 295 CANCELLED = 6; 296 297 // Specifies task failed. 298 FAILED = 7; 299 300 // Specifies task was skipped due to cache hit. 301 SKIPPED = 8; 302 303 // Specifies that the task was not triggered because the task's trigger 304 // policy is not satisfied. The trigger policy is specified in the 305 // `condition` field of 306 // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec]. 307 NOT_TRIGGERED = 9; 308 } 309 310 // Output only. The system generated ID of the task. 311 int64 task_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 312 313 // Output only. The id of the parent task if the task is within a component 314 // scope. Empty if the task is at the root level. 315 int64 parent_task_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; 316 317 // Output only. The user specified name of the task that is defined in 318 // [pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec]. 319 string task_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 320 321 // Output only. Task create time. 322 google.protobuf.Timestamp create_time = 3 323 [(google.api.field_behavior) = OUTPUT_ONLY]; 324 325 // Output only. Task start time. 326 google.protobuf.Timestamp start_time = 4 327 [(google.api.field_behavior) = OUTPUT_ONLY]; 328 329 // Output only. Task end time. 330 google.protobuf.Timestamp end_time = 5 331 [(google.api.field_behavior) = OUTPUT_ONLY]; 332 333 // Output only. The detailed execution info. 334 PipelineTaskExecutorDetail executor_detail = 6 335 [(google.api.field_behavior) = OUTPUT_ONLY]; 336 337 // Output only. State of the task. 338 State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 339 340 // Output only. The execution metadata of the task. 341 Execution execution = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 342 343 // Output only. The error that occurred during task execution. 344 // Only populated when the task's state is FAILED or CANCELLED. 345 google.rpc.Status error = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 346 347 // Output only. A list of task status. This field keeps a record of task 348 // status evolving over time. 349 repeated PipelineTaskStatus pipeline_task_status = 13 350 [(google.api.field_behavior) = OUTPUT_ONLY]; 351 352 // Output only. The runtime input artifacts of the task. 353 map<string, ArtifactList> inputs = 10 354 [(google.api.field_behavior) = OUTPUT_ONLY]; 355 356 // Output only. The runtime output artifacts of the task. 357 map<string, ArtifactList> outputs = 11 358 [(google.api.field_behavior) = OUTPUT_ONLY]; 359} 360 361// The runtime detail of a pipeline executor. 362message PipelineTaskExecutorDetail { 363 // The detail of a container execution. It contains the job names of the 364 // lifecycle of a container execution. 365 message ContainerDetail { 366 // Output only. The name of the 367 // [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob] for the main 368 // container execution. 369 string main_job = 1 [ 370 (google.api.field_behavior) = OUTPUT_ONLY, 371 (google.api.resource_reference) = { 372 type: "aiplatform.googleapis.com/CustomJob" 373 } 374 ]; 375 376 // Output only. The name of the 377 // [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob] for the 378 // pre-caching-check container execution. This job will be available if the 379 // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec] 380 // specifies the `pre_caching_check` hook in the lifecycle events. 381 string pre_caching_check_job = 2 [ 382 (google.api.field_behavior) = OUTPUT_ONLY, 383 (google.api.resource_reference) = { 384 type: "aiplatform.googleapis.com/CustomJob" 385 } 386 ]; 387 388 // Output only. The names of the previously failed 389 // [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob] for the main 390 // container executions. The list includes the all attempts in chronological 391 // order. 392 repeated string failed_main_jobs = 3 393 [(google.api.field_behavior) = OUTPUT_ONLY]; 394 395 // Output only. The names of the previously failed 396 // [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob] for the 397 // pre-caching-check container executions. This job will be available if the 398 // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec] 399 // specifies the `pre_caching_check` hook in the lifecycle events. The list 400 // includes the all attempts in chronological order. 401 repeated string failed_pre_caching_check_jobs = 4 402 [(google.api.field_behavior) = OUTPUT_ONLY]; 403 } 404 405 // The detailed info for a custom job executor. 406 message CustomJobDetail { 407 // Output only. The name of the 408 // [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. 409 string job = 1 [ 410 (google.api.field_behavior) = OUTPUT_ONLY, 411 (google.api.resource_reference) = { 412 type: "aiplatform.googleapis.com/CustomJob" 413 } 414 ]; 415 416 // Output only. The names of the previously failed 417 // [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes 418 // the all attempts in chronological order. 419 repeated string failed_jobs = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 420 } 421 422 oneof details { 423 // Output only. The detailed info for a container executor. 424 ContainerDetail container_detail = 1 425 [(google.api.field_behavior) = OUTPUT_ONLY]; 426 427 // Output only. The detailed info for a custom job executor. 428 CustomJobDetail custom_job_detail = 2 429 [(google.api.field_behavior) = OUTPUT_ONLY]; 430 } 431} 432