# frozen_string_literal: true # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! module Google module Cloud module AIPlatform module V1 # The TrainingPipeline orchestrates tasks associated with training a Model. It # always executes the training task, and optionally may also # export data from Vertex AI's Dataset which becomes the training input, # {::Google::Cloud::AIPlatform::V1::ModelService::Client#upload_model upload} the Model to # Vertex AI, and evaluate the Model. # @!attribute [r] name # @return [::String] # Output only. Resource name of the TrainingPipeline. # @!attribute [rw] display_name # @return [::String] # Required. The user-defined name of this TrainingPipeline. # @!attribute [rw] input_data_config # @return [::Google::Cloud::AIPlatform::V1::InputDataConfig] # Specifies Vertex AI owned input data that may be used for training the # Model. The TrainingPipeline's # {::Google::Cloud::AIPlatform::V1::TrainingPipeline#training_task_definition training_task_definition} # should make clear whether this config is used and if there are any special # requirements on how it should be filled. If nothing about this config is # mentioned in the # {::Google::Cloud::AIPlatform::V1::TrainingPipeline#training_task_definition training_task_definition}, # then it should be assumed that the TrainingPipeline does not depend on this # configuration. # @!attribute [rw] training_task_definition # @return [::String] # Required. A Google Cloud Storage path to the YAML file that defines the # training task which is responsible for producing the model artifact, and # may also include additional auxiliary work. The definition files that can # be used here are found in # gs://google-cloud-aiplatform/schema/trainingjob/definition/. # Note: The URI given on output will be immutable and probably different, # including the URI scheme, than the one given on input. The output URI will # point to a location where the user only has a read access. # @!attribute [rw] training_task_inputs # @return [::Google::Protobuf::Value] # Required. The training task's parameter(s), as specified in the # {::Google::Cloud::AIPlatform::V1::TrainingPipeline#training_task_definition training_task_definition}'s # `inputs`. # @!attribute [r] training_task_metadata # @return [::Google::Protobuf::Value] # Output only. The metadata information as specified in the # {::Google::Cloud::AIPlatform::V1::TrainingPipeline#training_task_definition training_task_definition}'s # `metadata`. This metadata is an auxiliary runtime and final information # about the training task. While the pipeline is running this information is # populated only at a best effort basis. Only present if the # pipeline's # {::Google::Cloud::AIPlatform::V1::TrainingPipeline#training_task_definition training_task_definition} # contains `metadata` object. # @!attribute [rw] model_to_upload # @return [::Google::Cloud::AIPlatform::V1::Model] # Describes the Model that may be uploaded (via # {::Google::Cloud::AIPlatform::V1::ModelService::Client#upload_model ModelService.UploadModel}) # by this TrainingPipeline. The TrainingPipeline's # {::Google::Cloud::AIPlatform::V1::TrainingPipeline#training_task_definition training_task_definition} # should make clear whether this Model description should be populated, and # if there are any special requirements regarding how it should be filled. If # nothing is mentioned in the # {::Google::Cloud::AIPlatform::V1::TrainingPipeline#training_task_definition training_task_definition}, # then it should be assumed that this field should not be filled and the # training task either uploads the Model without a need of this information, # or that training task does not support uploading a Model as part of the # pipeline. When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and # the trained Model had been uploaded into Vertex AI, then the # model_to_upload's resource {::Google::Cloud::AIPlatform::V1::Model#name name} is # populated. The Model is always uploaded into the Project and Location in # which this pipeline is. # @!attribute [rw] model_id # @return [::String] # Optional. The ID to use for the uploaded Model, which will become the final # component of the model resource name. # # This value may be up to 63 characters, and valid characters are # `[a-z0-9_-]`. The first character cannot be a number or hyphen. # @!attribute [rw] parent_model # @return [::String] # Optional. When specify this field, the `model_to_upload` will not be # uploaded as a new model, instead, it will become a new version of this # `parent_model`. # @!attribute [r] state # @return [::Google::Cloud::AIPlatform::V1::PipelineState] # Output only. The detailed state of the pipeline. # @!attribute [r] error # @return [::Google::Rpc::Status] # Output only. Only populated when the pipeline's state is # `PIPELINE_STATE_FAILED` or `PIPELINE_STATE_CANCELLED`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. Time when the TrainingPipeline was created. # @!attribute [r] start_time # @return [::Google::Protobuf::Timestamp] # Output only. Time when the TrainingPipeline for the first time entered the # `PIPELINE_STATE_RUNNING` state. # @!attribute [r] end_time # @return [::Google::Protobuf::Timestamp] # Output only. Time when the TrainingPipeline entered any of the following # states: `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`, # `PIPELINE_STATE_CANCELLED`. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. Time when the TrainingPipeline was most recently updated. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # The labels with user-defined metadata to organize TrainingPipelines. # # Label keys and values can be no longer than 64 characters # (Unicode codepoints), can only contain lowercase letters, numeric # characters, underscores and dashes. International characters are allowed. # # See https://goo.gl/xmQnxf for more information and examples of labels. # @!attribute [rw] encryption_spec # @return [::Google::Cloud::AIPlatform::V1::EncryptionSpec] # Customer-managed encryption key spec for a TrainingPipeline. If set, this # TrainingPipeline will be secured by this key. # # Note: Model trained by this TrainingPipeline is also secured by this key if # {::Google::Cloud::AIPlatform::V1::TrainingPipeline#encryption_spec model_to_upload} # is not set separately. class TrainingPipeline include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Specifies Vertex AI owned input data to be used for training, and # possibly evaluating, the Model. # @!attribute [rw] fraction_split # @return [::Google::Cloud::AIPlatform::V1::FractionSplit] # Split based on fractions defining the size of each set. # @!attribute [rw] filter_split # @return [::Google::Cloud::AIPlatform::V1::FilterSplit] # Split based on the provided filters for each set. # @!attribute [rw] predefined_split # @return [::Google::Cloud::AIPlatform::V1::PredefinedSplit] # Supported only for tabular Datasets. # # Split based on a predefined key. # @!attribute [rw] timestamp_split # @return [::Google::Cloud::AIPlatform::V1::TimestampSplit] # Supported only for tabular Datasets. # # Split based on the timestamp of the input data pieces. # @!attribute [rw] stratified_split # @return [::Google::Cloud::AIPlatform::V1::StratifiedSplit] # Supported only for tabular Datasets. # # Split based on the distribution of the specified column. # @!attribute [rw] gcs_destination # @return [::Google::Cloud::AIPlatform::V1::GcsDestination] # The Cloud Storage location where the training data is to be # written to. In the given directory a new directory is created with # name: # `dataset---` # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. # All training input data is written into that directory. # # The Vertex AI environment variables representing Cloud Storage # data URIs are represented in the Cloud Storage wildcard # format to support sharded data. e.g.: "gs://.../training-*.jsonl" # # * AIP_DATA_FORMAT = "jsonl" for non-tabular data, "csv" for tabular data # * AIP_TRAINING_DATA_URI = # "gcs_destination/dataset---