inference_experiments
Creates, updates, deletes or gets an inference_experiment
resource or lists inference_experiments
in a region
Overview
Name | inference_experiments |
Type | Resource |
Description | Resource Type definition for AWS::SageMaker::InferenceExperiment |
Id | aws.sagemaker.inference_experiments |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | The Amazon Resource Name (ARN) of the inference experiment. |
name | string | The name for the inference experiment. |
type | string | The type of the inference experiment that you want to run. |
description | string | The description of the inference experiment. |
role_arn | string | The 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_name | string | The name of the endpoint used to run the monitoring job. |
endpoint_metadata | object | The metadata of the endpoint on which the inference experiment ran. |
schedule | object | The duration for which you want the inference experiment to run. |
kms_key | string | The 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_config | object | The Amazon S3 location and configuration for storing inference request and response data. |
model_variants | array | An array of ModelVariantConfig objects. Each ModelVariantConfig object in the array describes the infrastructure configuration for the corresponding variant. |
shadow_mode_config | object | 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. |
tags | array | An array of key-value pairs to apply to this resource. |
creation_time | string | The timestamp at which you created the inference experiment. |
last_modified_time | string | The timestamp at which you last modified the inference experiment. |
status | string | The status of the inference experiment. |
status_reason | string | The error message or client-specified reason from the StopInferenceExperiment API, that explains the status of the inference experiment. |
desired_state | string | The desired state of the experiment after starting or stopping operation. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, Type, RoleArn, EndpointName, ModelVariants, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all inference_experiments
in a region.
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';
Gets all properties from an individual 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.sagemaker.inference_experiments (
Name,
Type,
RoleArn,
EndpointName,
ModelVariants,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ RoleArn }}',
'{{ EndpointName }}',
'{{ ModelVariants }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.sagemaker.inference_experiments (
Name,
Type,
Description,
RoleArn,
EndpointName,
Schedule,
KmsKey,
DataStorageConfig,
ModelVariants,
ShadowModeConfig,
Tags,
StatusReason,
DesiredState,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ Description }}',
'{{ RoleArn }}',
'{{ EndpointName }}',
'{{ Schedule }}',
'{{ KmsKey }}',
'{{ DataStorageConfig }}',
'{{ ModelVariants }}',
'{{ ShadowModeConfig }}',
'{{ Tags }}',
'{{ StatusReason }}',
'{{ DesiredState }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: inference_experiment
props:
- name: Name
value: '{{ Name }}'
- name: Type
value: '{{ Type }}'
- name: Description
value: '{{ Description }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: EndpointName
value: '{{ EndpointName }}'
- name: Schedule
value:
StartTime: '{{ StartTime }}'
EndTime: '{{ EndTime }}'
- name: KmsKey
value: '{{ KmsKey }}'
- name: DataStorageConfig
value:
Destination: '{{ Destination }}'
KmsKey: '{{ KmsKey }}'
ContentType:
CsvContentTypes:
- '{{ CsvContentTypes[0] }}'
JsonContentTypes:
- '{{ JsonContentTypes[0] }}'
- name: ModelVariants
value:
- ModelName: '{{ ModelName }}'
VariantName: '{{ VariantName }}'
InfrastructureConfig:
InfrastructureType: '{{ InfrastructureType }}'
RealTimeInferenceConfig:
InstanceType: '{{ InstanceType }}'
InstanceCount: '{{ InstanceCount }}'
- name: ShadowModeConfig
value:
SourceModelVariantName: '{{ SourceModelVariantName }}'
ShadowModelVariants:
- ShadowModelVariantName: '{{ ShadowModelVariantName }}'
SamplingPercentage: '{{ SamplingPercentage }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
- name: StatusReason
value: '{{ StatusReason }}'
- name: DesiredState
value: '{{ DesiredState }}'
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