Creating a trained model
After you have associated the configured model algorithm to a collaboration, then created and configured an ML input channel, you are ready create a trained model. A trained model is used by members of a collaboration to jointly analyze their data.
- Console
-
To create a trained model in AWS Clean Rooms
-
Sign in to the AWS Management Console and open the AWS Clean Rooms console
with your AWS account (if you haven't yet done so). -
In the left navigation pane, choose Collaborations.
-
On the Collaborations page, choose the collaboration that you want to create a trained model in.
-
After the collaboration opens, choose the ML models tab, then choose Create trained model.
-
For Create trained model, for Trained custom model details, enter a Name and optional Description.
-
For Training data set, choose the ML input channel for this trained model.
-
For Hyperparameters, specify any algorithm-specific parameters and their intended values. Hyperparameters are specific to the model being trained and are used to fine-tune model training.
-
For Environment variables, specify any algorithm-specific variables and their intended values. Environment variables are set in the Docker container.
-
For Service access, choose the Existing service role name that will be used to access this table or choose Create and use a new service role.
-
For EC2 Resource configuration, specify information about the compute resources that are used for model training. You must specify the Instance type and Volume size that are used.
-
Choose Create trained model.
-
- API
-
The member with the ability to train a model starts training by selecting the ML input channel and the model algorithm:
import boto3 acr_ml_client= boto3.client('cleanroomsml') acr_ml_client.create_trained_model( membershipIdentifier= '
membership_id
', configuredModelAlgorithmAssociationArn = 'arn:aws:cleanrooms-ml:region
:account
:membership
/membershipIdentifier/configured-model-algorithm-association/identifier
', name='trained_model_name', resourceConfig={ 'instanceType': "ml.m5.xlarge", 'volumeSizeInGB': 1 }, dataChannels=[ { "mlInputChannelArn": channel_arn_1, "channelName": "channel_name
" }, { "mlInputChannelArn": channel_arn_2, "channelName": "channel_name
" } ] )