Skip to main content

training_pipelines

Creates, updates, deletes, gets or lists a training_pipelines resource.

Overview

Nametraining_pipelines
TypeResource
Idgoogle.aiplatform.training_pipelines

Fields

NameDatatypeDescription
namestringOutput only. Resource name of the TrainingPipeline.
createTimestringOutput only. Time when the TrainingPipeline was created.
displayNamestringRequired. The user-defined name of this TrainingPipeline.
encryptionSpecobjectRepresents a customer-managed encryption key spec that can be applied to a top-level resource.
endTimestringOutput only. Time when the TrainingPipeline entered any of the following states: PIPELINE_STATE_SUCCEEDED, PIPELINE_STATE_FAILED, PIPELINE_STATE_CANCELLED.
errorobjectThe Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
inputDataConfigobjectSpecifies Vertex AI owned input data to be used for training, and possibly evaluating, the Model.
labelsobjectThe 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.
modelIdstringOptional. 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.
modelToUploadobjectA trained machine learning Model.
parentModelstringOptional. 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.
startTimestringOutput only. Time when the TrainingPipeline for the first time entered the PIPELINE_STATE_RUNNING state.
statestringOutput only. The detailed state of the pipeline.
trainingTaskDefinitionstringRequired. 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.
trainingTaskInputsanyRequired. The training task's parameter(s), as specified in the training_task_definition's inputs.
trainingTaskMetadataanyOutput only. The metadata information as specified in the 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 training_task_definition contains metadata object.
updateTimestringOutput only. Time when the TrainingPipeline was most recently updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, trainingPipelinesIdGets a TrainingPipeline.
listSELECTlocationsId, projectsIdLists TrainingPipelines in a Location.
createINSERTlocationsId, projectsIdCreates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.
deleteDELETElocationsId, projectsId, trainingPipelinesIdDeletes a TrainingPipeline.
cancelEXEClocationsId, projectsId, trainingPipelinesIdCancels a TrainingPipeline. Starts asynchronous cancellation on the TrainingPipeline. The server makes a best effort to cancel the pipeline, but success is not guaranteed. Clients can use PipelineService.GetTrainingPipeline or other methods to check whether the cancellation succeeded or whether the pipeline completed despite cancellation. On successful cancellation, the TrainingPipeline is not deleted; instead it becomes a pipeline with a TrainingPipeline.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and TrainingPipeline.state is set to CANCELLED.

SELECT examples

Lists TrainingPipelines in a Location.

SELECT
name,
createTime,
displayName,
encryptionSpec,
endTime,
error,
inputDataConfig,
labels,
modelId,
modelToUpload,
parentModel,
startTime,
state,
trainingTaskDefinition,
trainingTaskInputs,
trainingTaskMetadata,
updateTime
FROM google.aiplatform.training_pipelines
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new training_pipelines resource.

/*+ create */
INSERT INTO google.aiplatform.training_pipelines (
locationsId,
projectsId,
displayName,
labels,
modelId,
modelToUpload,
encryptionSpec,
inputDataConfig,
trainingTaskDefinition,
parentModel,
trainingTaskInputs
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ labels }}',
'{{ modelId }}',
'{{ modelToUpload }}',
'{{ encryptionSpec }}',
'{{ inputDataConfig }}',
'{{ trainingTaskDefinition }}',
'{{ parentModel }}',
'{{ trainingTaskInputs }}'
;

DELETE example

Deletes the specified training_pipelines resource.

/*+ delete */
DELETE FROM google.aiplatform.training_pipelines
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND trainingPipelinesId = '{{ trainingPipelinesId }}';