trained_models
Creates, updates, deletes, gets or lists a trained_models resource.
Overview
| Name | trained_models |
| Type | Resource |
| Id | aws.cleanroomsml.trained_models |
Fields
The following fields are returned by SELECT queries:
- get_trained_model
- list_trained_models
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the trained model. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>) |
collaboration_identifier | string | The collaboration ID of the collaboration that contains the trained model. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
configured_model_algorithm_association_arn | string | The Amazon Resource Name (ARN) of the configured model algorithm association that was used to create the trained model. (pattern: <code>arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:membership/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/configured-model-algorithm-association/[-a-zA-Z0-9_/.]+</code>) |
create_time | string (date-time) | The time at which the trained model was created. |
data_channels | array | The data channels that were used for the trained model. |
description | string | The description of the trained model. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
environment | object | The EC2 environment that was used to create the trained model. |
hyperparameters | object | The hyperparameters that were used to create the trained model. |
incremental_training_data_channels | array | Information about the incremental training data channels used to create this version of the trained model. This includes details about the base model that was used for incremental training and the channel configuration. |
kms_key_arn | string | The Amazon Resource Name (ARN) of the KMS key. This key is used to encrypt and decrypt customer-owned data in the trained ML model and associated data. (pattern: <code>arn:aws[-a-z]*:kms:[-a-z0-9]+:[0-9]{12}:key/.+</code>) |
logs_status | string | The logs status for the trained model. (PUBLISH_SUCCEEDED, PUBLISH_FAILED) |
logs_status_details | string | Details about the logs status for the trained model. |
membership_identifier | string | The membership ID of the member that created the trained model. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
metrics_status | string | The status of the model metrics. (PUBLISH_SUCCEEDED, PUBLISH_FAILED) |
metrics_status_details | string | Details about the metrics status for the trained model. |
ml_model_training_payer_account_id | string | The account ID of the member that is responsible for paying for model training costs. (pattern: <code>[0-9]{12}</code>) |
resource_config | object | The EC2 resource configuration that was used to create the trained model. |
status | string | The status of the trained model. (CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED, ACTIVE, DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED, INACTIVE, CANCEL_PENDING, CANCEL_IN_PROGRESS, CANCEL_FAILED) |
status_details | object | Details about the status of a resource. |
stopping_condition | object | The stopping condition that was used to terminate model training. |
tags | object | The optional metadata that you applied to the resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. The following basic restrictions apply to tags: Maximum number of tags per resource - 50. For each resource, each tag key must be unique, and each tag key can have only one value. Maximum key length - 128 Unicode characters in UTF-8. Maximum value length - 256 Unicode characters in UTF-8. If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are case sensitive. Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for keys as it is reserved for AWS use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has aws as its prefix but the key does not, then Clean Rooms ML considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit. |
trained_model_arn | string | The Amazon Resource Name (ARN) of the trained model. (pattern: <code>arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:membership/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/trained-model/[-a-zA-Z0-9_/.]+</code>) |
training_container_image_digest | string | Information about the training image container. |
training_input_mode | string | The input mode that was used for accessing the training data when this trained model was created. This indicates how the training data was made available to the training algorithm. (File, FastFile, Pipe) |
update_time | string (date-time) | The most recent time at which the trained model was updated. |
version_identifier | string | The version identifier of the trained model. This unique identifier distinguishes this version from other versions of the same trained model. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the trained model. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>) |
collaboration_identifier | string | The collaboration ID of the collaboration that contains the trained model. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
configured_model_algorithm_association_arn | string | The Amazon Resource Name (ARN) of the configured model algorithm association that was used to create this trained model. (pattern: <code>arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:membership/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/configured-model-algorithm-association/[-a-zA-Z0-9_/.]+</code>) |
create_time | string (date-time) | The time at which the trained model was created. |
description | string | The description of the trained model. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>) |
incremental_training_data_channels | array | Information about the incremental training data channels used to create this version of the trained model. |
membership_identifier | string | The membership ID of the member that created the trained model. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
ml_model_training_payer_account_id | string | The account ID of the member that is responsible for paying for model training costs. (pattern: <code>[0-9]{12}</code>) |
status | string | The status of the trained model. (CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED, ACTIVE, DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED, INACTIVE, CANCEL_PENDING, CANCEL_IN_PROGRESS, CANCEL_FAILED) |
trained_model_arn | string | The Amazon Resource Name (ARN) of the trained model. (pattern: <code>arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:membership/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/trained-model/[-a-zA-Z0-9_/.]+</code>) |
update_time | string (date-time) | The most recent time at which the trained model was updated. |
version_identifier | string | The version identifier of this trained model version. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
Methods
The following methods are available for this resource:
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 |
|---|---|---|
membership_identifier | string | The membership ID of the member that is receiving the exported trained model artifacts. |
region | string | AWS region (default: us-east-1) |
trained_model_arn | string | The Amazon Resource Name (ARN) of the trained model that you want to export. |
trained_model_inference_job_arn | string | The Amazon Resource Name (ARN) of the trained model inference job that you want to cancel. |
maxResults | integer | The maximum size of the results that is returned per call. |
nextToken | string | The token value retrieved from a previous call to access the next page of results. |
versionIdentifier | string | The version identifier of the trained model to cancel. This parameter allows you to specify which version of the trained model you want to cancel when multiple versions exist. If versionIdentifier is not specified, the base model will be cancelled. |
SELECT examples
- get_trained_model
- list_trained_models
Returns information about a trained model.
SELECT
name,
collaboration_identifier,
configured_model_algorithm_association_arn,
create_time,
data_channels,
description,
environment,
hyperparameters,
incremental_training_data_channels,
kms_key_arn,
logs_status,
logs_status_details,
membership_identifier,
metrics_status,
metrics_status_details,
ml_model_training_payer_account_id,
resource_config,
status,
status_details,
stopping_condition,
tags,
trained_model_arn,
training_container_image_digest,
training_input_mode,
update_time,
version_identifier
FROM aws.cleanroomsml.trained_models
WHERE trained_model_arn = '{{ trained_model_arn }}' -- required
AND membership_identifier = '{{ membership_identifier }}' -- required
AND region = '{{ region }}' -- required
AND versionIdentifier = '{{ versionIdentifier }}'
;
Returns a list of trained models.
SELECT
name,
collaboration_identifier,
configured_model_algorithm_association_arn,
create_time,
description,
incremental_training_data_channels,
membership_identifier,
ml_model_training_payer_account_id,
status,
trained_model_arn,
update_time,
version_identifier
FROM aws.cleanroomsml.trained_models
WHERE membership_identifier = '{{ membership_identifier }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_trained_model
- Manifest
Creates a trained model from an associated configured model algorithm using data from any member of the collaboration.
INSERT INTO aws.cleanroomsml.trained_models (
name,
configuredModelAlgorithmAssociationArn,
hyperparameters,
environment,
resourceConfig,
stoppingCondition,
incrementalTrainingDataChannels,
dataChannels,
trainingInputMode,
description,
kmsKeyArn,
tags,
mlModelTrainingPayerAccountId,
membership_identifier,
region
)
SELECT
'{{ name }}' /* required */,
'{{ configuredModelAlgorithmAssociationArn }}' /* required */,
'{{ hyperparameters }}',
'{{ environment }}',
'{{ resourceConfig }}' /* required */,
'{{ stoppingCondition }}',
'{{ incrementalTrainingDataChannels }}',
'{{ dataChannels }}' /* required */,
'{{ trainingInputMode }}',
'{{ description }}',
'{{ kmsKeyArn }}',
'{{ tags }}',
'{{ mlModelTrainingPayerAccountId }}',
'{{ membership_identifier }}',
'{{ region }}'
RETURNING
trained_model_arn,
version_identifier
;
# Description fields are for documentation purposes
- name: trained_models
props:
- name: membership_identifier
value: "{{ membership_identifier }}"
description: Required parameter for the trained_models resource.
- name: region
value: "{{ region }}"
description: Required parameter for the trained_models resource.
- name: name
value: "{{ name }}"
- name: configuredModelAlgorithmAssociationArn
value: "{{ configuredModelAlgorithmAssociationArn }}"
- name: hyperparameters
value: "{{ hyperparameters }}"
- name: environment
value: "{{ environment }}"
- name: resourceConfig
description: |
Information about the EC2 resources that are used to train the model.
value:
instanceCount: {{ instanceCount }}
instanceType: "{{ instanceType }}"
volumeSizeInGB: {{ volumeSizeInGB }}
- name: stoppingCondition
description: |
The criteria used to stop model training.
value:
maxRuntimeInSeconds: {{ maxRuntimeInSeconds }}
- name: incrementalTrainingDataChannels
value:
- trainedModelArn: "{{ trainedModelArn }}"
versionIdentifier: "{{ versionIdentifier }}"
channelName: "{{ channelName }}"
- name: dataChannels
value:
- mlInputChannelArn: "{{ mlInputChannelArn }}"
channelName: "{{ channelName }}"
s3DataDistributionType: "{{ s3DataDistributionType }}"
- name: trainingInputMode
value: "{{ trainingInputMode }}"
valid_values: ['File', 'FastFile', 'Pipe']
- name: description
value: "{{ description }}"
- name: kmsKeyArn
value: "{{ kmsKeyArn }}"
- name: tags
value: "{{ tags }}"
- name: mlModelTrainingPayerAccountId
value: "{{ mlModelTrainingPayerAccountId }}"
DELETE examples
- delete_trained_model_output
Deletes the model artifacts stored by the service.
DELETE FROM aws.cleanroomsml.trained_models
WHERE trained_model_arn = '{{ trained_model_arn }}' --required
AND membership_identifier = '{{ membership_identifier }}' --required
AND region = '{{ region }}' --required
AND versionIdentifier = '{{ versionIdentifier }}'
;
Lifecycle Methods
- cancel_trained_model
- cancel_trained_model_inference_job
- start_trained_model_inference_job
- start_trained_model_export_job
Submits a request to cancel the trained model job.
EXEC aws.cleanroomsml.trained_models.cancel_trained_model
@membership_identifier='{{ membership_identifier }}' --required,
@trained_model_arn='{{ trained_model_arn }}' --required,
@region='{{ region }}' --required,
@versionIdentifier='{{ versionIdentifier }}'
;
Submits a request to cancel a trained model inference job.
EXEC aws.cleanroomsml.trained_models.cancel_trained_model_inference_job
@membership_identifier='{{ membership_identifier }}' --required,
@trained_model_inference_job_arn='{{ trained_model_inference_job_arn }}' --required,
@region='{{ region }}' --required
;
Defines the information necessary to begin a trained model inference job.
EXEC aws.cleanroomsml.trained_models.start_trained_model_inference_job
@membership_identifier='{{ membership_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"name": "{{ name }}",
"trainedModelArn": "{{ trainedModelArn }}",
"trainedModelVersionIdentifier": "{{ trainedModelVersionIdentifier }}",
"configuredModelAlgorithmAssociationArn": "{{ configuredModelAlgorithmAssociationArn }}",
"resourceConfig": "{{ resourceConfig }}",
"outputConfiguration": "{{ outputConfiguration }}",
"dataSource": "{{ dataSource }}",
"description": "{{ description }}",
"containerExecutionParameters": "{{ containerExecutionParameters }}",
"environment": "{{ environment }}",
"kmsKeyArn": "{{ kmsKeyArn }}",
"tags": "{{ tags }}",
"mlModelInferencePayerAccountId": "{{ mlModelInferencePayerAccountId }}"
}'
;
Provides the information necessary to start a trained model export job.
EXEC aws.cleanroomsml.trained_models.start_trained_model_export_job
@trained_model_arn='{{ trained_model_arn }}' --required,
@membership_identifier='{{ membership_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"name": "{{ name }}",
"trainedModelVersionIdentifier": "{{ trainedModelVersionIdentifier }}",
"outputConfiguration": "{{ outputConfiguration }}",
"description": "{{ description }}"
}'
;