SageMaker / Client / create_ai_workload_config

create_ai_workload_config

SageMaker.Client.create_ai_workload_config(**kwargs)

Creates a reusable AI workload configuration that defines datasets, data sources, and benchmark tool settings for consistent performance testing of generative AI inference deployments on Amazon SageMaker AI.

See also: AWS API Documentation

Request Syntax

response = client.create_ai_workload_config(
    AIWorkloadConfigName='string',
    DatasetConfig={
        'InputDataConfig': [
            {
                'ChannelName': 'string',
                'DataSource': {
                    'S3DataSource': {
                        'S3Uri': 'string'
                    }
                }
            },
        ]
    },
    AIWorkloadConfigs={
        'WorkloadSpec': {
            'Inline': 'string'
        }
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • AIWorkloadConfigName (string) –

    [REQUIRED]

    The name of the AI workload configuration. The name must be unique within your Amazon Web Services account in the current Amazon Web Services Region.

  • DatasetConfig (dict) –

    The dataset configuration for the workload. Specify input data channels with their data sources for benchmark workloads.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: InputDataConfig.

    • InputDataConfig (list) –

      An array of input data channel configurations for the workload.

      • (dict) –

        A channel of input data for an AI workload configuration. Each channel has a name and a data source.

        • ChannelName (string) – [REQUIRED]

          The logical name for the data channel.

        • DataSource (dict) – [REQUIRED]

          The data source for this channel.

          • S3DataSource (dict) –

            The Amazon S3 data source configuration.

            • S3Uri (string) – [REQUIRED]

              The Amazon S3 URI of the data.

  • AIWorkloadConfigs (dict) –

    The benchmark tool configuration and workload specification. Provide the specification as an inline YAML or JSON string.

    • WorkloadSpec (dict) – [REQUIRED]

      The workload specification that defines benchmark parameters.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: Inline.

      • Inline (string) –

        An inline YAML or JSON string that defines benchmark parameters.

  • Tags (list) –

    The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.

    • (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.

Return type:

dict

Returns:

Response Syntax

{
    'AIWorkloadConfigArn': 'string'
}

Response Structure

  • (dict) –

    • AIWorkloadConfigArn (string) –

      The Amazon Resource Name (ARN) of the created AI workload configuration.

Exceptions

  • SageMaker.Client.exceptions.ResourceInUse

  • SageMaker.Client.exceptions.ResourceLimitExceeded