Skip to main content

trained_models

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

Overview

Nametrained_models
TypeResource
Idaws.cleanroomsml.trained_models

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the trained model. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>)
collaboration_identifierstringThe 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_arnstringThe 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_timestring (date-time)The time at which the trained model was created.
data_channelsarrayThe data channels that were used for the trained model.
descriptionstringThe description of the trained model. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t\r\n]*</code>)
environmentobjectThe EC2 environment that was used to create the trained model.
hyperparametersobjectThe hyperparameters that were used to create the trained model.
incremental_training_data_channelsarrayInformation 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_arnstringThe 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_statusstringThe logs status for the trained model. (PUBLISH_SUCCEEDED, PUBLISH_FAILED)
logs_status_detailsstringDetails about the logs status for the trained model.
membership_identifierstringThe 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_statusstringThe status of the model metrics. (PUBLISH_SUCCEEDED, PUBLISH_FAILED)
metrics_status_detailsstringDetails about the metrics status for the trained model.
ml_model_training_payer_account_idstringThe account ID of the member that is responsible for paying for model training costs. (pattern: <code>[0-9]{12}</code>)
resource_configobjectThe EC2 resource configuration that was used to create the trained model.
statusstringThe 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_detailsobjectDetails about the status of a resource.
stopping_conditionobjectThe stopping condition that was used to terminate model training.
tagsobjectThe 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_arnstringThe 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_digeststringInformation about the training image container.
training_input_modestringThe 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_timestring (date-time)The most recent time at which the trained model was updated.
version_identifierstringThe 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>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_trained_modelselecttrained_model_arn, membership_identifier, regionversionIdentifierReturns information about a trained model.
list_trained_modelsselectmembership_identifier, regionnextToken, maxResultsReturns a list of trained models.
create_trained_modelinsertmembership_identifier, region, name, configuredModelAlgorithmAssociationArn, resourceConfig, dataChannelsCreates a trained model from an associated configured model algorithm using data from any member of the collaboration.
delete_trained_model_outputdeletetrained_model_arn, membership_identifier, regionversionIdentifierDeletes the model artifacts stored by the service.
cancel_trained_modelexecmembership_identifier, trained_model_arn, regionversionIdentifierSubmits a request to cancel the trained model job.
cancel_trained_model_inference_jobexecmembership_identifier, trained_model_inference_job_arn, regionSubmits a request to cancel a trained model inference job.
start_trained_model_inference_jobexecmembership_identifier, region, name, trainedModelArn, resourceConfig, outputConfiguration, dataSourceDefines the information necessary to begin a trained model inference job.
start_trained_model_export_jobexectrained_model_arn, membership_identifier, region, name, outputConfigurationProvides the information necessary to start a trained model export job.

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.

NameDatatypeDescription
membership_identifierstringThe membership ID of the member that is receiving the exported trained model artifacts.
regionstringAWS region (default: us-east-1)
trained_model_arnstringThe Amazon Resource Name (ARN) of the trained model that you want to export.
trained_model_inference_job_arnstringThe Amazon Resource Name (ARN) of the trained model inference job that you want to cancel.
maxResultsintegerThe maximum size of the results that is returned per call.
nextTokenstringThe token value retrieved from a previous call to access the next page of results.
versionIdentifierstringThe 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

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 }}'
;

INSERT examples

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
;

DELETE examples

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

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 }}'
;