pipeline_job.proto 16 KB

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