pipeline_job.proto 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. // Copyright 2021 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_state.proto";
  23. import "google/cloud/aiplatform/v1beta1/value.proto";
  24. import "google/protobuf/struct.proto";
  25. import "google/protobuf/timestamp.proto";
  26. import "google/rpc/status.proto";
  27. import "google/api/annotations.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 runtime parameters of the PipelineJob. The parameters will be
  48. // passed into [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec] to replace the placeholders
  49. // at runtime.
  50. map<string, Value> parameters = 1;
  51. // Required. A path in a Cloud Storage bucket, which will be treated as the root
  52. // output directory of the pipeline. It is used by the system to
  53. // generate the paths of output artifacts. The artifact paths are generated
  54. // with a sub-path pattern `{job_id}/{task_id}/{output_key}` under the
  55. // specified output directory. The service account specified in this
  56. // pipeline must have the `storage.objects.get` and `storage.objects.create`
  57. // permissions for this bucket.
  58. string gcs_output_directory = 2 [(google.api.field_behavior) = REQUIRED];
  59. }
  60. // Output only. The resource name of the PipelineJob.
  61. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  62. // The display name of the Pipeline.
  63. // The name can be up to 128 characters long and can be consist of any UTF-8
  64. // characters.
  65. string display_name = 2;
  66. // Output only. Pipeline creation time.
  67. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  68. // Output only. Pipeline start time.
  69. google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  70. // Output only. Pipeline end time.
  71. google.protobuf.Timestamp end_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  72. // Output only. Timestamp when this PipelineJob was most recently updated.
  73. google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  74. // Required. The spec of the pipeline.
  75. google.protobuf.Struct pipeline_spec = 7 [(google.api.field_behavior) = REQUIRED];
  76. // Output only. The detailed state of the job.
  77. PipelineState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  78. // Output only. The details of pipeline run. Not available in the list view.
  79. PipelineJobDetail job_detail = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  80. // Output only. The error that occurred during pipeline execution.
  81. // Only populated when the pipeline's state is FAILED or CANCELLED.
  82. google.rpc.Status error = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  83. // The labels with user-defined metadata to organize PipelineJob.
  84. //
  85. // Label keys and values can be no longer than 64 characters
  86. // (Unicode codepoints), can only contain lowercase letters, numeric
  87. // characters, underscores and dashes. International characters are allowed.
  88. //
  89. // See https://goo.gl/xmQnxf for more information and examples of labels.
  90. map<string, string> labels = 11;
  91. // Runtime config of the pipeline.
  92. RuntimeConfig runtime_config = 12;
  93. // Customer-managed encryption key spec for a pipelineJob. If set, this
  94. // PipelineJob and all of its sub-resources will be secured by this key.
  95. EncryptionSpec encryption_spec = 16;
  96. // The service account that the pipeline workload runs as.
  97. // If not specified, the Compute Engine default service account in the project
  98. // will be used.
  99. // See
  100. // https://cloud.google.com/compute/docs/access/service-accounts#default_service_account
  101. //
  102. // Users starting the pipeline must have the `iam.serviceAccounts.actAs`
  103. // permission on this service account.
  104. string service_account = 17;
  105. // The full name of the Compute Engine
  106. // [network](/compute/docs/networks-and-firewalls#networks) to which the
  107. // Pipeline Job's workload should be peered. For example,
  108. // `projects/12345/global/networks/myVPC`.
  109. // [Format](/compute/docs/reference/rest/v1/networks/insert)
  110. // is of the form `projects/{project}/global/networks/{network}`.
  111. // Where {project} is a project number, as in `12345`, and {network} is a
  112. // network name.
  113. //
  114. // Private services access must already be configured for the network.
  115. // Pipeline job will apply the network configuration to the GCP resources
  116. // being launched, if applied, such as Vertex AI
  117. // Training or Dataflow job. If left unspecified, the workload is not peered
  118. // with any network.
  119. string network = 18 [(google.api.resource_reference) = {
  120. type: "compute.googleapis.com/Network"
  121. }];
  122. }
  123. // The runtime detail of PipelineJob.
  124. message PipelineJobDetail {
  125. // Output only. The context of the pipeline.
  126. Context pipeline_context = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  127. // Output only. The context of the current pipeline run.
  128. Context pipeline_run_context = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  129. // Output only. The runtime details of the tasks under the pipeline.
  130. repeated PipelineTaskDetail task_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  131. }
  132. // The runtime detail of a task execution.
  133. message PipelineTaskDetail {
  134. // A list of artifact metadata.
  135. message ArtifactList {
  136. // Output only. A list of artifact metadata.
  137. repeated Artifact artifacts = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  138. }
  139. // Specifies state of TaskExecution
  140. enum State {
  141. // Unspecified.
  142. STATE_UNSPECIFIED = 0;
  143. // Specifies pending state for the task.
  144. PENDING = 1;
  145. // Specifies task is being executed.
  146. RUNNING = 2;
  147. // Specifies task completed successfully.
  148. SUCCEEDED = 3;
  149. // Specifies Task cancel is in pending state.
  150. CANCEL_PENDING = 4;
  151. // Specifies task is being cancelled.
  152. CANCELLING = 5;
  153. // Specifies task was cancelled.
  154. CANCELLED = 6;
  155. // Specifies task failed.
  156. FAILED = 7;
  157. // Specifies task was skipped due to cache hit.
  158. SKIPPED = 8;
  159. // Specifies that the task was not triggered because the task's trigger
  160. // policy is not satisfied. The trigger policy is specified in the
  161. // `condition` field of [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec].
  162. NOT_TRIGGERED = 9;
  163. }
  164. // Output only. The system generated ID of the task.
  165. int64 task_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  166. // Output only. The id of the parent task if the task is within a component scope.
  167. // Empty if the task is at the root level.
  168. int64 parent_task_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  169. // Output only. The user specified name of the task that is defined in
  170. // [PipelineJob.spec][].
  171. string task_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  172. // Output only. Task create time.
  173. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  174. // Output only. Task start time.
  175. google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  176. // Output only. Task end time.
  177. google.protobuf.Timestamp end_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  178. // Output only. The detailed execution info.
  179. PipelineTaskExecutorDetail executor_detail = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  180. // Output only. State of the task.
  181. State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  182. // Output only. The execution metadata of the task.
  183. Execution execution = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  184. // Output only. The error that occurred during task execution.
  185. // Only populated when the task's state is FAILED or CANCELLED.
  186. google.rpc.Status error = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  187. // Output only. The runtime input artifacts of the task.
  188. map<string, ArtifactList> inputs = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  189. // Output only. The runtime output artifacts of the task.
  190. map<string, ArtifactList> outputs = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  191. }
  192. // The runtime detail of a pipeline executor.
  193. message PipelineTaskExecutorDetail {
  194. // The detail of a container execution. It contains the job names of the
  195. // lifecycle of a container execution.
  196. message ContainerDetail {
  197. // Output only. The name of the [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob] for the main container execution.
  198. string main_job = 1 [
  199. (google.api.field_behavior) = OUTPUT_ONLY,
  200. (google.api.resource_reference) = {
  201. type: "aiplatform.googleapis.com/CustomJob"
  202. }
  203. ];
  204. // Output only. The name of the [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob] for the pre-caching-check container
  205. // execution. This job will be available if the
  206. // [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec] specifies the `pre_caching_check` hook in
  207. // the lifecycle events.
  208. string pre_caching_check_job = 2 [
  209. (google.api.field_behavior) = OUTPUT_ONLY,
  210. (google.api.resource_reference) = {
  211. type: "aiplatform.googleapis.com/CustomJob"
  212. }
  213. ];
  214. }
  215. // The detailed info for a custom job executor.
  216. message CustomJobDetail {
  217. option deprecated = true;
  218. // Output only. The name of the [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob].
  219. string job = 1 [
  220. (google.api.field_behavior) = OUTPUT_ONLY,
  221. (google.api.resource_reference) = {
  222. type: "aiplatform.googleapis.com/CustomJob"
  223. }
  224. ];
  225. }
  226. oneof details {
  227. // Output only. The detailed info for a container executor.
  228. ContainerDetail container_detail = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  229. // Output only. The detailed info for a custom job executor.
  230. CustomJobDetail custom_job_detail = 2 [
  231. deprecated = true,
  232. (google.api.field_behavior) = OUTPUT_ONLY
  233. ];
  234. }
  235. }