2023/05/26 - Amazon SageMaker Service - 8 updated api methods
Changes Added ml.p4d and ml.inf1 as supported instance type families for SageMaker Notebook Instances.
{'ModelVariants': {'InfrastructureConfig': {'RealTimeInferenceConfig': {'InstanceType': {'ml.inf1.24xlarge', 'ml.inf1.2xlarge', 'ml.inf1.6xlarge', 'ml.inf1.xlarge', 'ml.p4d.24xlarge', 'ml.p4de.24xlarge'}}}}}
Creates an inference experiment using the configurations specified in the request.
Use this API to setup and schedule an experiment to compare model variants on a Amazon SageMaker inference endpoint. For more information about inference experiments, see Shadow tests .
Amazon SageMaker begins your experiment at the scheduled time and routes traffic to your endpoint's model variants based on your specified configuration.
While the experiment is in progress or after it has concluded, you can view metrics that compare your model variants. For more information, see View, monitor, and edit shadow tests .
See also: AWS API Documentation
Request Syntax
client.create_inference_experiment( Name='string', Type='ShadowMode', Schedule={ 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1) }, Description='string', RoleArn='string', EndpointName='string', ModelVariants=[ { 'ModelName': 'string', 'VariantName': 'string', 'InfrastructureConfig': { 'InfrastructureType': 'RealTimeInference', 'RealTimeInferenceConfig': { 'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge', 'InstanceCount': 123 } } }, ], DataStorageConfig={ 'Destination': 'string', 'KmsKey': 'string', 'ContentType': { 'CsvContentTypes': [ 'string', ], 'JsonContentTypes': [ 'string', ] } }, ShadowModeConfig={ 'SourceModelVariantName': 'string', 'ShadowModelVariants': [ { 'ShadowModelVariantName': 'string', 'SamplingPercentage': 123 }, ] }, KmsKey='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The name for the inference experiment.
string
[REQUIRED]
The type of the inference experiment that you want to run. The following types of experiments are possible:
ShadowMode : You can use this type to validate a shadow variant. For more information, see Shadow tests .
dict
The duration for which you want the inference experiment to run. If you don't specify this field, the experiment automatically starts immediately upon creation and concludes after 7 days.
StartTime (datetime) --
The timestamp at which the inference experiment started or will start.
EndTime (datetime) --
The timestamp at which the inference experiment ended or will end.
string
A description for the inference experiment.
string
[REQUIRED]
The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.
string
[REQUIRED]
The name of the Amazon SageMaker endpoint on which you want to run the inference experiment.
list
[REQUIRED]
An array of ModelVariantConfig objects. There is one for each variant in the inference experiment. Each ModelVariantConfig object in the array describes the infrastructure configuration for the corresponding variant.
(dict) --
Contains information about the deployment options of a model.
ModelName (string) -- [REQUIRED]
The name of the Amazon SageMaker Model entity.
VariantName (string) -- [REQUIRED]
The name of the variant.
InfrastructureConfig (dict) -- [REQUIRED]
The configuration for the infrastructure that the model will be deployed to.
InfrastructureType (string) -- [REQUIRED]
The inference option to which to deploy your model. Possible values are the following:
RealTime : Deploy to real-time inference.
RealTimeInferenceConfig (dict) -- [REQUIRED]
The infrastructure configuration for deploying the model to real-time inference.
InstanceType (string) -- [REQUIRED]
The instance type the model is deployed to.
InstanceCount (integer) -- [REQUIRED]
The number of instances of the type specified by InstanceType .
dict
The Amazon S3 location and configuration for storing inference request and response data.
This is an optional parameter that you can use for data capture. For more information, see Capture data .
Destination (string) -- [REQUIRED]
The Amazon S3 bucket where the inference request and response data is stored.
KmsKey (string) --
The Amazon Web Services Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption.
ContentType (dict) --
Configuration specifying how to treat different headers. If no headers are specified SageMaker will by default base64 encode when capturing the data.
CsvContentTypes (list) --
The list of all content type headers that SageMaker will treat as CSV and capture accordingly.
(string) --
JsonContentTypes (list) --
The list of all content type headers that SageMaker will treat as JSON and capture accordingly.
(string) --
dict
[REQUIRED]
The configuration of ShadowMode inference experiment type. Use this field to specify a production variant which takes all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant also specify the percentage of requests that Amazon SageMaker replicates.
SourceModelVariantName (string) -- [REQUIRED]
The name of the production variant, which takes all the inference requests.
ShadowModelVariants (list) -- [REQUIRED]
List of shadow variant configurations.
(dict) --
The name and sampling percentage of a shadow variant.
ShadowModelVariantName (string) -- [REQUIRED]
The name of the shadow variant.
SamplingPercentage (integer) -- [REQUIRED]
The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.
string
The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. The KmsKey can be any of the following formats:
KMS key ID "1234abcd-12ab-34cd-56ef-1234567890ab"
Amazon Resource Name (ARN) of a KMS key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
KMS key Alias "alias/ExampleAlias"
Amazon Resource Name (ARN) of a KMS key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"
If you use a KMS key ID or an alias of your KMS key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt . If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS managed keys for OutputDataConfig . If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms" . For more information, see KMS managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.
The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint and UpdateEndpoint requests. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide .
list
Array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging your Amazon Web Services Resources .
(dict) --
A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.
You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags .
For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources . For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy .
Key (string) -- [REQUIRED]
The tag key. Tag keys must be unique per resource.
Value (string) -- [REQUIRED]
The tag value.
dict
Response Syntax
{ 'InferenceExperimentArn': 'string' }
Response Structure
(dict) --
InferenceExperimentArn (string) --
The ARN for your inference experiment.
{'InstanceType': {'ml.inf1.24xlarge', 'ml.inf1.2xlarge', 'ml.inf1.6xlarge', 'ml.inf1.xlarge', 'ml.p4d.24xlarge', 'ml.p4de.24xlarge'}}
Creates an SageMaker notebook instance. A notebook instance is a machine learning (ML) compute instance running on a Jupyter notebook.
In a CreateNotebookInstance request, specify the type of ML compute instance that you want to run. SageMaker launches the instance, installs common libraries that you can use to explore datasets for model training, and attaches an ML storage volume to the notebook instance.
SageMaker also provides a set of example notebooks. Each notebook demonstrates how to use SageMaker with a specific algorithm or with a machine learning framework.
After receiving the request, SageMaker does the following:
Creates a network interface in the SageMaker VPC.
(Option) If you specified SubnetId , SageMaker creates a network interface in your own VPC, which is inferred from the subnet ID that you provide in the input. When creating this network interface, SageMaker attaches the security group that you specified in the request to the network interface that it creates in your VPC.
Launches an EC2 instance of the type specified in the request in the SageMaker VPC. If you specified SubnetId of your VPC, SageMaker specifies both network interfaces when launching this instance. This enables inbound traffic from your own VPC to the notebook instance, assuming that the security groups allow it.
After creating the notebook instance, SageMaker returns its Amazon Resource Name (ARN). You can't change the name of a notebook instance after you create it.
After SageMaker creates the notebook instance, you can connect to the Jupyter server and work in Jupyter notebooks. For example, you can write code to explore a dataset that you can use for model training, train a model, host models by creating SageMaker endpoints, and validate hosted models.
For more information, see How It Works .
See also: AWS API Documentation
Request Syntax
client.create_notebook_instance( NotebookInstanceName='string', InstanceType='ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge', SubnetId='string', SecurityGroupIds=[ 'string', ], RoleArn='string', KmsKeyId='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], LifecycleConfigName='string', DirectInternetAccess='Enabled'|'Disabled', VolumeSizeInGB=123, AcceleratorTypes=[ 'ml.eia1.medium'|'ml.eia1.large'|'ml.eia1.xlarge'|'ml.eia2.medium'|'ml.eia2.large'|'ml.eia2.xlarge', ], DefaultCodeRepository='string', AdditionalCodeRepositories=[ 'string', ], RootAccess='Enabled'|'Disabled', PlatformIdentifier='string', InstanceMetadataServiceConfiguration={ 'MinimumInstanceMetadataServiceVersion': 'string' } )
string
[REQUIRED]
The name of the new notebook instance.
string
[REQUIRED]
The type of ML compute instance to launch for the notebook instance.
string
The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.
list
The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
(string) --
string
[REQUIRED]
When you send any requests to Amazon Web Services resources from the notebook instance, SageMaker assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker can perform these tasks. The policy must allow the SageMaker service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see SageMaker Roles .
Note
To be able to pass this role to SageMaker, the caller of this API must have the iam:PassRole permission.
string
The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see Enabling and Disabling Keys in the Amazon Web Services Key Management Service Developer Guide .
list
An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources .
(dict) --
A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.
You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags .
For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources . For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy .
Key (string) -- [REQUIRED]
The tag key. Tag keys must be unique per resource.
Value (string) -- [REQUIRED]
The tag value.
string
The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance .
string
Sets whether SageMaker provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker training and endpoint services unless you configure a NAT Gateway in your VPC.
For more information, see Notebook Instances Are Internet-Enabled by Default . You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.
integer
The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.
list
A list of Elastic Inference (EI) instance types to associate with this notebook instance. Currently, only one instance type can be associated with a notebook instance. For more information, see Using Elastic Inference in Amazon SageMaker .
(string) --
string
A Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in Amazon Web Services CodeCommit or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with SageMaker Notebook Instances .
list
An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in Amazon Web Services CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with SageMaker Notebook Instances .
(string) --
string
Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled .
Note
Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
string
The platform identifier of the notebook instance runtime environment.
dict
Information on the IMDS configuration of the notebook instance
MinimumInstanceMetadataServiceVersion (string) -- [REQUIRED]
Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance , if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance , there is no default.
dict
Response Syntax
{ 'NotebookInstanceArn': 'string' }
Response Structure
(dict) --
NotebookInstanceArn (string) --
The Amazon Resource Name (ARN) of the notebook instance.
{'ModelVariants': {'InfrastructureConfig': {'RealTimeInferenceConfig': {'InstanceType': {'ml.inf1.24xlarge', 'ml.inf1.2xlarge', 'ml.inf1.6xlarge', 'ml.inf1.xlarge', 'ml.p4d.24xlarge', 'ml.p4de.24xlarge'}}}}}
Returns details about an inference experiment.
See also: AWS API Documentation
Request Syntax
client.describe_inference_experiment( Name='string' )
string
[REQUIRED]
The name of the inference experiment to describe.
dict
Response Syntax
{ 'Arn': 'string', 'Name': 'string', 'Type': 'ShadowMode', 'Schedule': { 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1) }, 'Status': 'Creating'|'Created'|'Updating'|'Running'|'Starting'|'Stopping'|'Completed'|'Cancelled', 'StatusReason': 'string', 'Description': 'string', 'CreationTime': datetime(2015, 1, 1), 'CompletionTime': datetime(2015, 1, 1), 'LastModifiedTime': datetime(2015, 1, 1), 'RoleArn': 'string', 'EndpointMetadata': { 'EndpointName': 'string', 'EndpointConfigName': 'string', 'EndpointStatus': 'OutOfService'|'Creating'|'Updating'|'SystemUpdating'|'RollingBack'|'InService'|'Deleting'|'Failed', 'FailureReason': 'string' }, 'ModelVariants': [ { 'ModelName': 'string', 'VariantName': 'string', 'InfrastructureConfig': { 'InfrastructureType': 'RealTimeInference', 'RealTimeInferenceConfig': { 'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge', 'InstanceCount': 123 } }, 'Status': 'Creating'|'Updating'|'InService'|'Deleting'|'Deleted' }, ], 'DataStorageConfig': { 'Destination': 'string', 'KmsKey': 'string', 'ContentType': { 'CsvContentTypes': [ 'string', ], 'JsonContentTypes': [ 'string', ] } }, 'ShadowModeConfig': { 'SourceModelVariantName': 'string', 'ShadowModelVariants': [ { 'ShadowModelVariantName': 'string', 'SamplingPercentage': 123 }, ] }, 'KmsKey': 'string' }
Response Structure
(dict) --
Arn (string) --
The ARN of the inference experiment being described.
Name (string) --
The name of the inference experiment.
Type (string) --
The type of the inference experiment.
Schedule (dict) --
The duration for which the inference experiment ran or will run.
StartTime (datetime) --
The timestamp at which the inference experiment started or will start.
EndTime (datetime) --
The timestamp at which the inference experiment ended or will end.
Status (string) --
The status of the inference experiment. The following are the possible statuses for an inference experiment:
Creating - Amazon SageMaker is creating your experiment.
Created - Amazon SageMaker has finished the creation of your experiment and will begin the experiment at the scheduled time.
Updating - When you make changes to your experiment, your experiment shows as updating.
Starting - Amazon SageMaker is beginning your experiment.
Running - Your experiment is in progress.
Stopping - Amazon SageMaker is stopping your experiment.
Completed - Your experiment has completed.
Cancelled - When you conclude your experiment early using the StopInferenceExperiment API, or if any operation fails with an unexpected error, it shows as cancelled.
StatusReason (string) --
The error message or client-specified Reason from the StopInferenceExperiment API, that explains the status of the inference experiment.
Description (string) --
The description of the inference experiment.
CreationTime (datetime) --
The timestamp at which you created the inference experiment.
CompletionTime (datetime) --
The timestamp at which the inference experiment was completed.
LastModifiedTime (datetime) --
The timestamp at which you last modified the inference experiment.
RoleArn (string) --
The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.
EndpointMetadata (dict) --
The metadata of the endpoint on which the inference experiment ran.
EndpointName (string) --
The name of the endpoint.
EndpointConfigName (string) --
The name of the endpoint configuration.
EndpointStatus (string) --
The status of the endpoint. For possible values of the status of an endpoint, see EndpointSummary .
FailureReason (string) --
If the status of the endpoint is Failed , or the status is InService but update operation fails, this provides the reason why it failed.
ModelVariants (list) --
An array of ModelVariantConfigSummary objects. There is one for each variant in the inference experiment. Each ModelVariantConfigSummary object in the array describes the infrastructure configuration for deploying the corresponding variant.
(dict) --
Summary of the deployment configuration of a model.
ModelName (string) --
The name of the Amazon SageMaker Model entity.
VariantName (string) --
The name of the variant.
InfrastructureConfig (dict) --
The configuration of the infrastructure that the model has been deployed to.
InfrastructureType (string) --
The inference option to which to deploy your model. Possible values are the following:
RealTime : Deploy to real-time inference.
RealTimeInferenceConfig (dict) --
The infrastructure configuration for deploying the model to real-time inference.
InstanceType (string) --
The instance type the model is deployed to.
InstanceCount (integer) --
The number of instances of the type specified by InstanceType .
Status (string) --
The status of deployment for the model variant on the hosted inference endpoint.
Creating - Amazon SageMaker is preparing the model variant on the hosted inference endpoint.
InService - The model variant is running on the hosted inference endpoint.
Updating - Amazon SageMaker is updating the model variant on the hosted inference endpoint.
Deleting - Amazon SageMaker is deleting the model variant on the hosted inference endpoint.
Deleted - The model variant has been deleted on the hosted inference endpoint. This can only happen after stopping the experiment.
DataStorageConfig (dict) --
The Amazon S3 location and configuration for storing inference request and response data.
Destination (string) --
The Amazon S3 bucket where the inference request and response data is stored.
KmsKey (string) --
The Amazon Web Services Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption.
ContentType (dict) --
Configuration specifying how to treat different headers. If no headers are specified SageMaker will by default base64 encode when capturing the data.
CsvContentTypes (list) --
The list of all content type headers that SageMaker will treat as CSV and capture accordingly.
(string) --
JsonContentTypes (list) --
The list of all content type headers that SageMaker will treat as JSON and capture accordingly.
(string) --
ShadowModeConfig (dict) --
The configuration of ShadowMode inference experiment type, which shows the production variant that takes all the inference requests, and the shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant it also shows the percentage of requests that Amazon SageMaker replicates.
SourceModelVariantName (string) --
The name of the production variant, which takes all the inference requests.
ShadowModelVariants (list) --
List of shadow variant configurations.
(dict) --
The name and sampling percentage of a shadow variant.
ShadowModelVariantName (string) --
The name of the shadow variant.
SamplingPercentage (integer) --
The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.
KmsKey (string) --
The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. For more information, see CreateInferenceExperiment .
{'InstanceType': {'ml.inf1.24xlarge', 'ml.inf1.2xlarge', 'ml.inf1.6xlarge', 'ml.inf1.xlarge', 'ml.p4d.24xlarge', 'ml.p4de.24xlarge'}}
Returns information about a notebook instance.
See also: AWS API Documentation
Request Syntax
client.describe_notebook_instance( NotebookInstanceName='string' )
string
[REQUIRED]
The name of the notebook instance that you want information about.
dict
Response Syntax
{ 'NotebookInstanceArn': 'string', 'NotebookInstanceName': 'string', 'NotebookInstanceStatus': 'Pending'|'InService'|'Stopping'|'Stopped'|'Failed'|'Deleting'|'Updating', 'FailureReason': 'string', 'Url': 'string', 'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge', 'SubnetId': 'string', 'SecurityGroups': [ 'string', ], 'RoleArn': 'string', 'KmsKeyId': 'string', 'NetworkInterfaceId': 'string', 'LastModifiedTime': datetime(2015, 1, 1), 'CreationTime': datetime(2015, 1, 1), 'NotebookInstanceLifecycleConfigName': 'string', 'DirectInternetAccess': 'Enabled'|'Disabled', 'VolumeSizeInGB': 123, 'AcceleratorTypes': [ 'ml.eia1.medium'|'ml.eia1.large'|'ml.eia1.xlarge'|'ml.eia2.medium'|'ml.eia2.large'|'ml.eia2.xlarge', ], 'DefaultCodeRepository': 'string', 'AdditionalCodeRepositories': [ 'string', ], 'RootAccess': 'Enabled'|'Disabled', 'PlatformIdentifier': 'string', 'InstanceMetadataServiceConfiguration': { 'MinimumInstanceMetadataServiceVersion': 'string' } }
Response Structure
(dict) --
NotebookInstanceArn (string) --
The Amazon Resource Name (ARN) of the notebook instance.
NotebookInstanceName (string) --
The name of the SageMaker notebook instance.
NotebookInstanceStatus (string) --
The status of the notebook instance.
FailureReason (string) --
If status is Failed , the reason it failed.
Url (string) --
The URL that you use to connect to the Jupyter notebook that is running in your notebook instance.
InstanceType (string) --
The type of ML compute instance running on the notebook instance.
SubnetId (string) --
The ID of the VPC subnet.
SecurityGroups (list) --
The IDs of the VPC security groups.
(string) --
RoleArn (string) --
The Amazon Resource Name (ARN) of the IAM role associated with the instance.
KmsKeyId (string) --
The Amazon Web Services KMS key ID SageMaker uses to encrypt data when storing it on the ML storage volume attached to the instance.
NetworkInterfaceId (string) --
The network interface IDs that SageMaker created at the time of creating the instance.
LastModifiedTime (datetime) --
A timestamp. Use this parameter to retrieve the time when the notebook instance was last modified.
CreationTime (datetime) --
A timestamp. Use this parameter to return the time when the notebook instance was created
NotebookInstanceLifecycleConfigName (string) --
Returns the name of a notebook instance lifecycle configuration.
For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance
DirectInternetAccess (string) --
Describes whether SageMaker provides internet access to the notebook instance. If this value is set to Disabled , the notebook instance does not have internet access, and cannot connect to SageMaker training and endpoint services.
For more information, see Notebook Instances Are Internet-Enabled by Default .
VolumeSizeInGB (integer) --
The size, in GB, of the ML storage volume attached to the notebook instance.
AcceleratorTypes (list) --
A list of the Elastic Inference (EI) instance types associated with this notebook instance. Currently only one EI instance type can be associated with a notebook instance. For more information, see Using Elastic Inference in Amazon SageMaker .
(string) --
DefaultCodeRepository (string) --
The Git repository associated with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in Amazon Web Services CodeCommit or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with SageMaker Notebook Instances .
AdditionalCodeRepositories (list) --
An array of up to three Git repositories associated with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in Amazon Web Services CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with SageMaker Notebook Instances .
(string) --
RootAccess (string) --
Whether root access is enabled or disabled for users of the notebook instance.
Note
Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
PlatformIdentifier (string) --
The platform identifier of the notebook instance runtime environment.
InstanceMetadataServiceConfiguration (dict) --
Information on the IMDS configuration of the notebook instance
MinimumInstanceMetadataServiceVersion (string) --
Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance , if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance , there is no default.
{'NotebookInstances': {'InstanceType': {'ml.inf1.24xlarge', 'ml.inf1.2xlarge', 'ml.inf1.6xlarge', 'ml.inf1.xlarge', 'ml.p4d.24xlarge', 'ml.p4de.24xlarge'}}}
Returns a list of the SageMaker notebook instances in the requester's account in an Amazon Web Services Region.
See also: AWS API Documentation
Request Syntax
client.list_notebook_instances( NextToken='string', MaxResults=123, SortBy='Name'|'CreationTime'|'Status', SortOrder='Ascending'|'Descending', NameContains='string', CreationTimeBefore=datetime(2015, 1, 1), CreationTimeAfter=datetime(2015, 1, 1), LastModifiedTimeBefore=datetime(2015, 1, 1), LastModifiedTimeAfter=datetime(2015, 1, 1), StatusEquals='Pending'|'InService'|'Stopping'|'Stopped'|'Failed'|'Deleting'|'Updating', NotebookInstanceLifecycleConfigNameContains='string', DefaultCodeRepositoryContains='string', AdditionalCodeRepositoryEquals='string' )
string
If the previous call to the ListNotebookInstances is truncated, the response includes a NextToken . You can use this token in your subsequent ListNotebookInstances request to fetch the next set of notebook instances.
Note
You might specify a filter or a sort order in your request. When response is truncated, you must use the same values for the filer and sort order in the next request.
integer
The maximum number of notebook instances to return.
string
The field to sort results by. The default is Name .
string
The sort order for results.
string
A string in the notebook instances' name. This filter returns only notebook instances whose name contains the specified string.
datetime
A filter that returns only notebook instances that were created before the specified time (timestamp).
datetime
A filter that returns only notebook instances that were created after the specified time (timestamp).
datetime
A filter that returns only notebook instances that were modified before the specified time (timestamp).
datetime
A filter that returns only notebook instances that were modified after the specified time (timestamp).
string
A filter that returns only notebook instances with the specified status.
string
A string in the name of a notebook instances lifecycle configuration associated with this notebook instance. This filter returns only notebook instances associated with a lifecycle configuration with a name that contains the specified string.
string
A string in the name or URL of a Git repository associated with this notebook instance. This filter returns only notebook instances associated with a git repository with a name that contains the specified string.
string
A filter that returns only notebook instances with associated with the specified git repository.
dict
Response Syntax
{ 'NextToken': 'string', 'NotebookInstances': [ { 'NotebookInstanceName': 'string', 'NotebookInstanceArn': 'string', 'NotebookInstanceStatus': 'Pending'|'InService'|'Stopping'|'Stopped'|'Failed'|'Deleting'|'Updating', 'Url': 'string', 'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge', 'CreationTime': datetime(2015, 1, 1), 'LastModifiedTime': datetime(2015, 1, 1), 'NotebookInstanceLifecycleConfigName': 'string', 'DefaultCodeRepository': 'string', 'AdditionalCodeRepositories': [ 'string', ] }, ] }
Response Structure
(dict) --
NextToken (string) --
If the response to the previous ListNotebookInstances request was truncated, SageMaker returns this token. To retrieve the next set of notebook instances, use the token in the next request.
NotebookInstances (list) --
An array of NotebookInstanceSummary objects, one for each notebook instance.
(dict) --
Provides summary information for an SageMaker notebook instance.
NotebookInstanceName (string) --
The name of the notebook instance that you want a summary for.
NotebookInstanceArn (string) --
The Amazon Resource Name (ARN) of the notebook instance.
NotebookInstanceStatus (string) --
The status of the notebook instance.
Url (string) --
The URL that you use to connect to the Jupyter notebook running in your notebook instance.
InstanceType (string) --
The type of ML compute instance that the notebook instance is running on.
CreationTime (datetime) --
A timestamp that shows when the notebook instance was created.
LastModifiedTime (datetime) --
A timestamp that shows when the notebook instance was last modified.
NotebookInstanceLifecycleConfigName (string) --
The name of a notebook instance lifecycle configuration associated with this notebook instance.
For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance .
DefaultCodeRepository (string) --
The Git repository associated with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in Amazon Web Services CodeCommit or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with SageMaker Notebook Instances .
AdditionalCodeRepositories (list) --
An array of up to three Git repositories associated with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in Amazon Web Services CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with SageMaker Notebook Instances .
(string) --
{'DesiredModelVariants': {'InfrastructureConfig': {'RealTimeInferenceConfig': {'InstanceType': {'ml.inf1.24xlarge', 'ml.inf1.2xlarge', 'ml.inf1.6xlarge', 'ml.inf1.xlarge', 'ml.p4d.24xlarge', 'ml.p4de.24xlarge'}}}}}
Stops an inference experiment.
See also: AWS API Documentation
Request Syntax
client.stop_inference_experiment( Name='string', ModelVariantActions={ 'string': 'Retain'|'Remove'|'Promote' }, DesiredModelVariants=[ { 'ModelName': 'string', 'VariantName': 'string', 'InfrastructureConfig': { 'InfrastructureType': 'RealTimeInference', 'RealTimeInferenceConfig': { 'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge', 'InstanceCount': 123 } } }, ], DesiredState='Completed'|'Cancelled', Reason='string' )
string
[REQUIRED]
The name of the inference experiment to stop.
dict
[REQUIRED]
Array of key-value pairs, with names of variants mapped to actions. The possible actions are the following:
Promote - Promote the shadow variant to a production variant
Remove - Delete the variant
Retain - Keep the variant as it is
(string) --
(string) --
list
An array of ModelVariantConfig objects. There is one for each variant that you want to deploy after the inference experiment stops. Each ModelVariantConfig describes the infrastructure configuration for deploying the corresponding variant.
(dict) --
Contains information about the deployment options of a model.
ModelName (string) -- [REQUIRED]
The name of the Amazon SageMaker Model entity.
VariantName (string) -- [REQUIRED]
The name of the variant.
InfrastructureConfig (dict) -- [REQUIRED]
The configuration for the infrastructure that the model will be deployed to.
InfrastructureType (string) -- [REQUIRED]
The inference option to which to deploy your model. Possible values are the following:
RealTime : Deploy to real-time inference.
RealTimeInferenceConfig (dict) -- [REQUIRED]
The infrastructure configuration for deploying the model to real-time inference.
InstanceType (string) -- [REQUIRED]
The instance type the model is deployed to.
InstanceCount (integer) -- [REQUIRED]
The number of instances of the type specified by InstanceType .
string
The desired state of the experiment after stopping. The possible states are the following:
Completed : The experiment completed successfully
Cancelled : The experiment was canceled
string
The reason for stopping the experiment.
dict
Response Syntax
{ 'InferenceExperimentArn': 'string' }
Response Structure
(dict) --
InferenceExperimentArn (string) --
The ARN of the stopped inference experiment.
{'ModelVariants': {'InfrastructureConfig': {'RealTimeInferenceConfig': {'InstanceType': {'ml.inf1.24xlarge', 'ml.inf1.2xlarge', 'ml.inf1.6xlarge', 'ml.inf1.xlarge', 'ml.p4d.24xlarge', 'ml.p4de.24xlarge'}}}}}
Updates an inference experiment that you created. The status of the inference experiment has to be either Created , Running . For more information on the status of an inference experiment, see DescribeInferenceExperiment .
See also: AWS API Documentation
Request Syntax
client.update_inference_experiment( Name='string', Schedule={ 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1) }, Description='string', ModelVariants=[ { 'ModelName': 'string', 'VariantName': 'string', 'InfrastructureConfig': { 'InfrastructureType': 'RealTimeInference', 'RealTimeInferenceConfig': { 'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge', 'InstanceCount': 123 } } }, ], DataStorageConfig={ 'Destination': 'string', 'KmsKey': 'string', 'ContentType': { 'CsvContentTypes': [ 'string', ], 'JsonContentTypes': [ 'string', ] } }, ShadowModeConfig={ 'SourceModelVariantName': 'string', 'ShadowModelVariants': [ { 'ShadowModelVariantName': 'string', 'SamplingPercentage': 123 }, ] } )
string
[REQUIRED]
The name of the inference experiment to be updated.
dict
The duration for which the inference experiment will run. If the status of the inference experiment is Created , then you can update both the start and end dates. If the status of the inference experiment is Running , then you can update only the end date.
StartTime (datetime) --
The timestamp at which the inference experiment started or will start.
EndTime (datetime) --
The timestamp at which the inference experiment ended or will end.
string
The description of the inference experiment.
list
An array of ModelVariantConfig objects. There is one for each variant, whose infrastructure configuration you want to update.
(dict) --
Contains information about the deployment options of a model.
ModelName (string) -- [REQUIRED]
The name of the Amazon SageMaker Model entity.
VariantName (string) -- [REQUIRED]
The name of the variant.
InfrastructureConfig (dict) -- [REQUIRED]
The configuration for the infrastructure that the model will be deployed to.
InfrastructureType (string) -- [REQUIRED]
The inference option to which to deploy your model. Possible values are the following:
RealTime : Deploy to real-time inference.
RealTimeInferenceConfig (dict) -- [REQUIRED]
The infrastructure configuration for deploying the model to real-time inference.
InstanceType (string) -- [REQUIRED]
The instance type the model is deployed to.
InstanceCount (integer) -- [REQUIRED]
The number of instances of the type specified by InstanceType .
dict
The Amazon S3 location and configuration for storing inference request and response data.
Destination (string) -- [REQUIRED]
The Amazon S3 bucket where the inference request and response data is stored.
KmsKey (string) --
The Amazon Web Services Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption.
ContentType (dict) --
Configuration specifying how to treat different headers. If no headers are specified SageMaker will by default base64 encode when capturing the data.
CsvContentTypes (list) --
The list of all content type headers that SageMaker will treat as CSV and capture accordingly.
(string) --
JsonContentTypes (list) --
The list of all content type headers that SageMaker will treat as JSON and capture accordingly.
(string) --
dict
The configuration of ShadowMode inference experiment type. Use this field to specify a production variant which takes all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant also specify the percentage of requests that Amazon SageMaker replicates.
SourceModelVariantName (string) -- [REQUIRED]
The name of the production variant, which takes all the inference requests.
ShadowModelVariants (list) -- [REQUIRED]
List of shadow variant configurations.
(dict) --
The name and sampling percentage of a shadow variant.
ShadowModelVariantName (string) -- [REQUIRED]
The name of the shadow variant.
SamplingPercentage (integer) -- [REQUIRED]
The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.
dict
Response Syntax
{ 'InferenceExperimentArn': 'string' }
Response Structure
(dict) --
InferenceExperimentArn (string) --
The ARN of the updated inference experiment.
{'InstanceType': {'ml.inf1.24xlarge', 'ml.inf1.2xlarge', 'ml.inf1.6xlarge', 'ml.inf1.xlarge', 'ml.p4d.24xlarge', 'ml.p4de.24xlarge'}}
Updates a notebook instance. NotebookInstance updates include upgrading or downgrading the ML compute instance used for your notebook instance to accommodate changes in your workload requirements.
See also: AWS API Documentation
Request Syntax
client.update_notebook_instance( NotebookInstanceName='string', InstanceType='ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.m5d.large'|'ml.m5d.xlarge'|'ml.m5d.2xlarge'|'ml.m5d.4xlarge'|'ml.m5d.8xlarge'|'ml.m5d.12xlarge'|'ml.m5d.16xlarge'|'ml.m5d.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5d.xlarge'|'ml.c5d.2xlarge'|'ml.c5d.4xlarge'|'ml.c5d.9xlarge'|'ml.c5d.18xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.r5.large'|'ml.r5.xlarge'|'ml.r5.2xlarge'|'ml.r5.4xlarge'|'ml.r5.8xlarge'|'ml.r5.12xlarge'|'ml.r5.16xlarge'|'ml.r5.24xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.16xlarge'|'ml.g5.12xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.inf1.xlarge'|'ml.inf1.2xlarge'|'ml.inf1.6xlarge'|'ml.inf1.24xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge', RoleArn='string', LifecycleConfigName='string', DisassociateLifecycleConfig=True|False, VolumeSizeInGB=123, DefaultCodeRepository='string', AdditionalCodeRepositories=[ 'string', ], AcceleratorTypes=[ 'ml.eia1.medium'|'ml.eia1.large'|'ml.eia1.xlarge'|'ml.eia2.medium'|'ml.eia2.large'|'ml.eia2.xlarge', ], DisassociateAcceleratorTypes=True|False, DisassociateDefaultCodeRepository=True|False, DisassociateAdditionalCodeRepositories=True|False, RootAccess='Enabled'|'Disabled', InstanceMetadataServiceConfiguration={ 'MinimumInstanceMetadataServiceVersion': 'string' } )
string
[REQUIRED]
The name of the notebook instance to update.
string
The Amazon ML compute instance type.
string
The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access the notebook instance. For more information, see SageMaker Roles .
Note
To be able to pass this role to SageMaker, the caller of this API must have the iam:PassRole permission.
string
The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance .
boolean
Set to true to remove the notebook instance lifecycle configuration currently associated with the notebook instance. This operation is idempotent. If you specify a lifecycle configuration that is not associated with the notebook instance when you call this method, it does not throw an error.
integer
The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. ML storage volumes are encrypted, so SageMaker can't determine the amount of available free space on the volume. Because of this, you can increase the volume size when you update a notebook instance, but you can't decrease the volume size. If you want to decrease the size of the ML storage volume in use, create a new notebook instance with the desired size.
string
The Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in Amazon Web Services CodeCommit or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with SageMaker Notebook Instances .
list
An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in Amazon Web Services CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with SageMaker Notebook Instances .
(string) --
list
A list of the Elastic Inference (EI) instance types to associate with this notebook instance. Currently only one EI instance type can be associated with a notebook instance. For more information, see Using Elastic Inference in Amazon SageMaker .
(string) --
boolean
A list of the Elastic Inference (EI) instance types to remove from this notebook instance. This operation is idempotent. If you specify an accelerator type that is not associated with the notebook instance when you call this method, it does not throw an error.
boolean
The name or URL of the default Git repository to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error.
boolean
A list of names or URLs of the default Git repositories to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error.
string
Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled .
Note
If you set this to Disabled , users don't have root access on the notebook instance, but lifecycle configuration scripts still run with root permissions.
dict
Information on the IMDS configuration of the notebook instance
MinimumInstanceMetadataServiceVersion (string) -- [REQUIRED]
Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance , if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance , there is no default.
dict
Response Syntax
{}
Response Structure
(dict) --