Skip to main content

inference_experiments

Creates, updates, deletes or gets an inference_experiment resource or lists inference_experiments in a region

Overview

Nameinference_experiments
TypeResource
DescriptionResource Type definition for AWS::SageMaker::InferenceExperiment
Idaws.sagemaker.inference_experiments

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the inference experiment.
namestringThe name for the inference experiment.
typestringThe type of the inference experiment that you want to run.
descriptionstringThe description of the inference experiment.
role_arnstringThe Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.
endpoint_namestringThe name of the endpoint used to run the monitoring job.
endpoint_metadataobjectThe metadata of the endpoint on which the inference experiment ran.
scheduleobjectThe duration for which you want the inference experiment to run.
kms_keystringThe AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
data_storage_configobjectThe Amazon S3 location and configuration for storing inference request and response data.
model_variantsarrayAn array of ModelVariantConfig objects. Each ModelVariantConfig object in the array describes the infrastructure configuration for the corresponding variant.
shadow_mode_configobjectThe 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.
tagsarrayAn array of key-value pairs to apply to this resource.
creation_timestringThe timestamp at which you created the inference experiment.
last_modified_timestringThe timestamp at which you last modified the inference experiment.
statusstringThe status of the inference experiment.
status_reasonstringThe error message or client-specified reason from the StopInferenceExperiment API, that explains the status of the inference experiment.
desired_statestringThe desired state of the experiment after starting or stopping operation.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, Type, RoleArn, EndpointName, ModelVariants, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourceSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

List all inference_experiments in a region.

SELECT
region,
name
FROM aws.sagemaker.inference_experiments
WHERE region = 'us-east-1';

Gets all properties from an inference_experiment.

SELECT
region,
arn,
name,
type,
description,
role_arn,
endpoint_name,
endpoint_metadata,
schedule,
kms_key,
data_storage_config,
model_variants,
shadow_mode_config,
tags,
creation_time,
last_modified_time,
status,
status_reason,
desired_state
FROM aws.sagemaker.inference_experiments
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';

INSERT example

Use the following StackQL query and manifest file to create a new inference_experiment resource, using stack-deploy.

/*+ create */
INSERT INTO aws.sagemaker.inference_experiments (
Name,
Type,
RoleArn,
EndpointName,
ModelVariants,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ RoleArn }}',
'{{ EndpointName }}',
'{{ ModelVariants }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.sagemaker.inference_experiments
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

To operate on the inference_experiments resource, the following permissions are required:

Create

sagemaker:CreateInferenceExperiment,
sagemaker:DescribeInferenceExperiment,
sagemaker:AddTags,
sagemaker:ListTags,
iam:PassRole

Delete

sagemaker:DeleteInferenceExperiment,
sagemaker:DescribeInferenceExperiment,
sagemaker:StopInferenceExperiment,
sagemaker:ListTags

List

sagemaker:ListInferenceExperiments

Read

sagemaker:DescribeInferenceExperiment,
sagemaker:ListTags

Update

sagemaker:UpdateInferenceExperiment,
sagemaker:StartInferenceExperiment,
sagemaker:StopInferenceExperiment,
sagemaker:DescribeInferenceExperiment,
sagemaker:AddTags,
sagemaker:DeleteTags,
sagemaker:ListTags