training_pipelines
Creates, updates, deletes, gets or lists a training_pipelines
resource.
Overview
Name | training_pipelines |
Type | Resource |
Id | google.aiplatform.training_pipelines |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the TrainingPipeline. |
createTime | string (google-datetime) | Output only. Time when the TrainingPipeline was created. |
displayName | string | Required. The user-defined name of this TrainingPipeline. |
encryptionSpec | object | 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 model_to_upload is not set separately. (id: GoogleCloudAiplatformV1EncryptionSpec) |
endTime | string (google-datetime) | Output only. Time when the TrainingPipeline entered any of the following states: PIPELINE_STATE_SUCCEEDED , PIPELINE_STATE_FAILED , PIPELINE_STATE_CANCELLED . |
error | object | The 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. (id: GoogleRpcStatus) |
inputDataConfig | object | Specifies Vertex AI owned input data that may be used for training the Model. The TrainingPipeline's 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 training_task_definition, then it should be assumed that the TrainingPipeline does not depend on this configuration. (id: GoogleCloudAiplatformV1InputDataConfig) |
labels | object | 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. |
modelId | 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. |
modelToUpload | object | A trained machine learning Model. (id: GoogleCloudAiplatformV1Model) |
parentModel | 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 . |
startTime | string (google-datetime) | Output only. Time when the TrainingPipeline for the first time entered the PIPELINE_STATE_RUNNING state. |
state | string | Output only. The detailed state of the pipeline. |
trainingTaskDefinition | 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. |
trainingTaskInputs | any | Required. The training task's parameter(s), as specified in the training_task_definition's inputs . |
trainingTaskMetadata | any | Output 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. |
updateTime | string (google-datetime) | Output only. Time when the TrainingPipeline was most recently updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the TrainingPipeline. |
createTime | string (google-datetime) | Output only. Time when the TrainingPipeline was created. |
displayName | string | Required. The user-defined name of this TrainingPipeline. |
encryptionSpec | object | 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 model_to_upload is not set separately. (id: GoogleCloudAiplatformV1EncryptionSpec) |
endTime | string (google-datetime) | Output only. Time when the TrainingPipeline entered any of the following states: PIPELINE_STATE_SUCCEEDED , PIPELINE_STATE_FAILED , PIPELINE_STATE_CANCELLED . |
error | object | The 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. (id: GoogleRpcStatus) |
inputDataConfig | object | Specifies Vertex AI owned input data that may be used for training the Model. The TrainingPipeline's 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 training_task_definition, then it should be assumed that the TrainingPipeline does not depend on this configuration. (id: GoogleCloudAiplatformV1InputDataConfig) |
labels | object | 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. |
modelId | 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. |
modelToUpload | object | A trained machine learning Model. (id: GoogleCloudAiplatformV1Model) |
parentModel | 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 . |
startTime | string (google-datetime) | Output only. Time when the TrainingPipeline for the first time entered the PIPELINE_STATE_RUNNING state. |
state | string | Output only. The detailed state of the pipeline. |
trainingTaskDefinition | 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. |
trainingTaskInputs | any | Required. The training task's parameter(s), as specified in the training_task_definition's inputs . |
trainingTaskMetadata | any | Output 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. |
updateTime | string (google-datetime) | Output only. Time when the TrainingPipeline was most recently updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , trainingPipelinesId | Gets a TrainingPipeline. | |
list | select | projectsId , locationsId | filter , pageSize , pageToken , readMask | Lists TrainingPipelines in a Location. |
create | insert | projectsId , locationsId | Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run. | |
delete | delete | projectsId , locationsId , trainingPipelinesId | Deletes a TrainingPipeline. | |
cancel | exec | projectsId , locationsId , trainingPipelinesId | Cancels 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 . |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
trainingPipelinesId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
readMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets a TrainingPipeline.
SELECT
name,
createTime,
displayName,
encryptionSpec,
endTime,
error,
inputDataConfig,
labels,
modelId,
modelToUpload,
parentModel,
startTime,
state,
trainingTaskDefinition,
trainingTaskInputs,
trainingTaskMetadata,
updateTime
FROM google.aiplatform.training_pipelines
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND trainingPipelinesId = '{{ trainingPipelinesId }}' -- required;
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 projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND readMask = '{{ readMask }}';
INSERT
examples
- create
- Manifest
Creates a TrainingPipeline. A created TrainingPipeline right away will be attempted to be run.
INSERT INTO google.aiplatform.training_pipelines (
data__displayName,
data__inputDataConfig,
data__trainingTaskDefinition,
data__trainingTaskInputs,
data__modelToUpload,
data__modelId,
data__parentModel,
data__labels,
data__encryptionSpec,
projectsId,
locationsId
)
SELECT
'{{ displayName }}',
'{{ inputDataConfig }}',
'{{ trainingTaskDefinition }}',
'{{ trainingTaskInputs }}',
'{{ modelToUpload }}',
'{{ modelId }}',
'{{ parentModel }}',
'{{ labels }}',
'{{ encryptionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
displayName,
encryptionSpec,
endTime,
error,
inputDataConfig,
labels,
modelId,
modelToUpload,
parentModel,
startTime,
state,
trainingTaskDefinition,
trainingTaskInputs,
trainingTaskMetadata,
updateTime
;
# Description fields are for documentation purposes
- name: training_pipelines
props:
- name: projectsId
value: string
description: Required parameter for the training_pipelines resource.
- name: locationsId
value: string
description: Required parameter for the training_pipelines resource.
- name: displayName
value: string
description: >
Required. The user-defined name of this TrainingPipeline.
- name: inputDataConfig
value: object
description: >
Specifies Vertex AI owned input data that may be used for training the Model. The TrainingPipeline's 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 training_task_definition, then it should be assumed that the TrainingPipeline does not depend on this configuration.
- name: trainingTaskDefinition
value: string
description: >
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.
- name: trainingTaskInputs
value: any
description: >
Required. The training task's parameter(s), as specified in the training_task_definition's `inputs`.
- name: modelToUpload
value: object
description: >
A trained machine learning Model.
- name: modelId
value: string
description: >
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.
- name: parentModel
value: string
description: >
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`.
- name: labels
value: object
description: >
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.
- name: encryptionSpec
value: object
description: >
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 model_to_upload is not set separately.
DELETE
examples
- delete
Deletes a TrainingPipeline.
DELETE FROM google.aiplatform.training_pipelines
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND trainingPipelinesId = '{{ trainingPipelinesId }}' --required;
Lifecycle Methods
- cancel
Cancels 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
.
EXEC google.aiplatform.training_pipelines.cancel
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@trainingPipelinesId='{{ trainingPipelinesId }}' --required;