Configure the default parameters of an Autopilot experiment (for administrators)
Autopilot supports setting default values to simplify the configuration of Amazon SageMaker Autopilot when you
create an Autopilot experiment using the Studio Classic UI. Administrators can use Studio Classic lifecycle configurations (LCC) to set infrastructure,
networking, and security values in configuration files and pre-populate the advanced settings of AutoML
jobs.
By doing so, they can fully control network connectivity and access permissions for the resources associated with Amazon SageMaker Studio Classic, including SageMaker instances, data sources, output data, and other related services. Specifically, administrators can configure a desired network architecture, such as Amazon VPC, subnets, and security groups, for a Studio Classic domain or individual user profiles. Data scientists can focus on data science specific parameters when creating their Autopilot experiments using the Studio Classic UI. Furthermore, administrators can manage the encryption of data on the instance in which Autopilot experiments run by setting default encryption keys.
Note
This feature is currently not available in the Asia Pacific (Hong Kong) and Middle East (Bahrain) opt-in Regions.
In the following sections, you can find the full list of parameters supporting the setting of defaults when creating an Autopilot experiment using the Studio Classic UI, and learn how to set those default values.
List of default parameters supported
The following parameters support setting default values with a configuration file for creating an Autopilot experiment using the Studio Classic UI. Once set, the values automatically fill in their corresponding field in the Autopilot' Create Experiment tab in the Studio Classic UI. See Advanced settings (optional) for a full description of each field.
-
Security: Amazon VPC, subnets, and security groups.
-
Access: AWS IAM role ARNs.
-
Encryption: AWS KMS key IDs.
-
Tags: Key-value pairs used to label and organize SageMaker resources.
Set default Autopilot experiment parameters
Administrators can set default values in a configuration file, then manually place the file in a recommended location within the Studio Classic environment of specific users, or they can pass the file to a lifecycle configuration script (LCC) to automate the customization of the Studio Classic environment for a given domain or user profile.
-
To set up the configuration file, start by filling in its default parameters.
To configure any or all default values listed in List of default parameters supported, administrators can create a configuration file named
config.yaml
, the structure of which should adhere to this sample configuration file. The following snippet shows a sample configuration file with all the supported AutoML
parameters. For more information on the format of this file, refer to the full schema. SchemaVersion: '1.0' SageMaker: AutoMLJob: # https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJob.html AutoMLJobConfig: SecurityConfig: EnableInterContainerTrafficEncryption: true VolumeKmsKeyId: '
kms-key-id
' VpcConfig: SecurityGroupIds: - 'security-group-id-1
' - 'security-group-id-2
' Subnets: - 'subnet-1
' - 'subnet-2
' OutputDataConfig: KmsKeyId: 'kms-key-id
' RoleArn: 'arn:aws:iam::111222333444:role/Admin
' Tags: - Key: 'tag_key
' Value: 'tag_value
' -
Then, place the configuration file in the recommended location by either manually copying the file to its recommended paths or using a lifecycle configuration (LCC).
The configuration file needs to be present in at least one of the following locations in the user's Studio Classic environment. By default, SageMaker searches for a configuration file in two locations:
-
First, in
/etc/xdg/sagemaker/config.yaml
. We refer to this file as the administrator configuration file. -
Then, in
/root/.config/sagemaker/config.yaml
. We refer to this file as the user configuration file.
Using the administrator configuration file, administrators can define a set of default values. Optionally, they can use the user configuration file to override values set in the administrator configuration file, or set additional default parameter values.
The following snippet shows a sample script which writes the default parameters configuration file to the administrator location in the user's Studio Classic environment. You can replace
/etc/xdg/sagemaker
with/root/.config/sagemaker
to write the file to the user location.## Sample script with AutoML intelligent defaults #!/bin/bash sudo mkdir -p /etc/xdg/sagemaker echo "SchemaVersion: '1.0' CustomParameters: AnyStringKey: 'AnyStringValue' SageMaker: AutoMLJob: # https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJob.html AutoMLJobConfig: SecurityConfig: EnableInterContainerTrafficEncryption: true VolumeKmsKeyId: '
kms-key-id
' VpcConfig: SecurityGroupIds: - 'security-group-id-1
' - 'security-group-id-2
' Subnets: - 'subnet-1
' - 'subnet-2
' OutputDataConfig: KmsKeyId: 'kms-key-id
' RoleArn: 'arn:aws:iam::111222333444:role/Admin
' Tags: - Key: 'tag_key
' Value: 'tag_value
' " | sudo tee /etc/xdg/sagemaker/config.yaml-
Copy the files manually – To copy the configuration files manually, run the script created in the previous step from a Studio Classic terminal. In this case, the user profile that executed the script can create Autopilot experiments with the default values applicable only to them.
-
Create a SageMaker lifecycle configuration – Alternatively, you can use a lifecycle configuration (LCC) to automate the customization of your Studio Classic environment. LCC are shell scripts triggered by Amazon SageMaker Studio Classic lifecycle events such as starting a Studio Classic application. This customization includes installing custom packages, configuring notebook extensions, pre-loading datasets, setting up source code repositories, or, in our case, pre-populating default parameters. Administrators can attach the LCC to a Studio Classic domain to automate the configuration of default values for each user profile within that domain.
The following sections detail how to create a lifecycle configuration so users can load Autopilot default parameters automatically when launching Studio Classic. You can choose to create an LCC using the SageMaker Console or the AWS CLI.
-