SageMaker / Client / describe_ai_recommendation_job

describe_ai_recommendation_job

SageMaker.Client.describe_ai_recommendation_job(**kwargs)

Returns details of an AI recommendation job, including its status, model source, performance targets, optimization recommendations, and deployment configurations.

See also: AWS API Documentation

Request Syntax

response = client.describe_ai_recommendation_job(
    AIRecommendationJobName='string'
)
Parameters:

AIRecommendationJobName (string) –

[REQUIRED]

The name of the AI recommendation job to describe.

Return type:

dict

Returns:

Response Syntax

{
    'AIRecommendationJobName': 'string',
    'AIRecommendationJobArn': 'string',
    'AIRecommendationJobStatus': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
    'FailureReason': 'string',
    'ModelSource': {
        'S3': {
            'S3Uri': 'string'
        }
    },
    'OutputConfig': {
        'S3OutputLocation': 'string',
        'ModelPackageGroupIdentifier': 'string'
    },
    'InferenceSpecification': {
        'Framework': 'LMI'|'VLLM'
    },
    'AIWorkloadConfigIdentifier': 'string',
    'OptimizeModel': True|False,
    'PerformanceTarget': {
        'Constraints': [
            {
                'Metric': 'ttft-ms'|'throughput'|'cost'
            },
        ]
    },
    'Recommendations': [
        {
            'RecommendationDescription': 'string',
            'OptimizationDetails': [
                {
                    'OptimizationType': 'SpeculativeDecoding'|'KernelTuning',
                    'OptimizationConfig': {
                        'string': 'string'
                    }
                },
            ],
            'ModelDetails': {
                'ModelPackageArn': 'string',
                'InferenceSpecificationName': 'string',
                'InstanceDetails': [
                    {
                        'InstanceType': 'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.g6.xlarge'|'ml.g6.2xlarge'|'ml.g6.4xlarge'|'ml.g6.8xlarge'|'ml.g6.12xlarge'|'ml.g6.16xlarge'|'ml.g6.24xlarge'|'ml.g6.48xlarge'|'ml.g6e.xlarge'|'ml.g6e.2xlarge'|'ml.g6e.4xlarge'|'ml.g6e.8xlarge'|'ml.g6e.12xlarge'|'ml.g6e.16xlarge'|'ml.g6e.24xlarge'|'ml.g6e.48xlarge'|'ml.g7e.2xlarge'|'ml.g7e.4xlarge'|'ml.g7e.8xlarge'|'ml.g7e.12xlarge'|'ml.g7e.24xlarge'|'ml.g7e.48xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge'|'ml.p5.4xlarge'|'ml.p5.48xlarge'|'ml.p5e.48xlarge'|'ml.p5en.48xlarge'|'ml.p6-b200.48xlarge',
                        'InstanceCount': 123,
                        'CopyCountPerInstance': 123
                    },
                ]
            },
            'DeploymentConfiguration': {
                'S3': [
                    {
                        'ChannelName': 'string',
                        'Uri': 'string'
                    },
                ],
                'ImageUri': 'string',
                'InstanceType': 'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.g6.xlarge'|'ml.g6.2xlarge'|'ml.g6.4xlarge'|'ml.g6.8xlarge'|'ml.g6.12xlarge'|'ml.g6.16xlarge'|'ml.g6.24xlarge'|'ml.g6.48xlarge'|'ml.g6e.xlarge'|'ml.g6e.2xlarge'|'ml.g6e.4xlarge'|'ml.g6e.8xlarge'|'ml.g6e.12xlarge'|'ml.g6e.16xlarge'|'ml.g6e.24xlarge'|'ml.g6e.48xlarge'|'ml.g7e.2xlarge'|'ml.g7e.4xlarge'|'ml.g7e.8xlarge'|'ml.g7e.12xlarge'|'ml.g7e.24xlarge'|'ml.g7e.48xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge'|'ml.p5.4xlarge'|'ml.p5.48xlarge'|'ml.p5e.48xlarge'|'ml.p5en.48xlarge'|'ml.p6-b200.48xlarge',
                'InstanceCount': 123,
                'CopyCountPerInstance': 123,
                'EnvironmentVariables': {
                    'string': 'string'
                }
            },
            'AIBenchmarkJobArn': 'string',
            'ExpectedPerformance': [
                {
                    'Metric': 'string',
                    'Stat': 'string',
                    'Value': 'string',
                    'Unit': 'string'
                },
            ]
        },
    ],
    'RoleArn': 'string',
    'ComputeSpec': {
        'InstanceTypes': [
            'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.g6.xlarge'|'ml.g6.2xlarge'|'ml.g6.4xlarge'|'ml.g6.8xlarge'|'ml.g6.12xlarge'|'ml.g6.16xlarge'|'ml.g6.24xlarge'|'ml.g6.48xlarge'|'ml.g6e.xlarge'|'ml.g6e.2xlarge'|'ml.g6e.4xlarge'|'ml.g6e.8xlarge'|'ml.g6e.12xlarge'|'ml.g6e.16xlarge'|'ml.g6e.24xlarge'|'ml.g6e.48xlarge'|'ml.g7e.2xlarge'|'ml.g7e.4xlarge'|'ml.g7e.8xlarge'|'ml.g7e.12xlarge'|'ml.g7e.24xlarge'|'ml.g7e.48xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p4d.24xlarge'|'ml.p4de.24xlarge'|'ml.p5.4xlarge'|'ml.p5.48xlarge'|'ml.p5e.48xlarge'|'ml.p5en.48xlarge'|'ml.p6-b200.48xlarge',
        ],
        'CapacityReservationConfig': {
            'CapacityReservationPreference': 'capacity-reservations-only',
            'MlReservationArns': [
                'string',
            ]
        }
    },
    'CreationTime': datetime(2015, 1, 1),
    'StartTime': datetime(2015, 1, 1),
    'EndTime': datetime(2015, 1, 1),
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • AIRecommendationJobName (string) –

      The name of the AI recommendation job.

    • AIRecommendationJobArn (string) –

      The Amazon Resource Name (ARN) of the AI recommendation job.

    • AIRecommendationJobStatus (string) –

      The status of the AI recommendation job.

    • FailureReason (string) –

      If the recommendation job failed, the reason it failed.

    • ModelSource (dict) –

      The source of the model that was analyzed.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: S3. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • S3 (dict) –

        The Amazon S3 location of the model artifacts.

        • S3Uri (string) –

          The Amazon S3 URI of the model artifacts.

    • OutputConfig (dict) –

      The output configuration for the recommendation job.

      • S3OutputLocation (string) –

        The Amazon S3 URI where the recommendation job writes its output results.

      • ModelPackageGroupIdentifier (string) –

        The name or Amazon Resource Name (ARN) of the model package group where deployment-ready model packages are registered.

    • InferenceSpecification (dict) –

      The inference framework configuration.

      • Framework (string) –

        The inference framework. Valid values are LMI and VLLM.

    • AIWorkloadConfigIdentifier (string) –

      The name or Amazon Resource Name (ARN) of the AI workload configuration used for this recommendation job.

    • OptimizeModel (boolean) –

      Whether model optimization techniques were allowed.

    • PerformanceTarget (dict) –

      The performance targets specified for the recommendation job.

      • Constraints (list) –

        An array of performance constraints that define the optimization objectives.

        • (dict) –

          A performance constraint for an AI recommendation job.

          • Metric (string) –

            The performance metric. Valid values are ttft-ms (time to first token in milliseconds), throughput, and cost.

    • Recommendations (list) –

      The list of optimization recommendations generated by the job. Each recommendation includes optimization details, deployment configuration, expected performance metrics, and the associated benchmark job ARN.

      • (dict) –

        An optimization recommendation generated by an AI recommendation job.

        • RecommendationDescription (string) –

          A description of the recommendation.

        • OptimizationDetails (list) –

          The optimization techniques applied in this recommendation.

          • (dict) –

            Details about an optimization technique applied in a recommendation.

            • OptimizationType (string) –

              The type of optimization. Valid values are SpeculativeDecoding and KernelTuning.

            • OptimizationConfig (dict) –

              A map of configuration parameters for the optimization technique.

              • (string) –

                • (string) –

        • ModelDetails (dict) –

          Details about the model package associated with this recommendation.

          • ModelPackageArn (string) –

            The Amazon Resource Name (ARN) of the model package.

          • InferenceSpecificationName (string) –

            The name of the inference specification within the model package.

          • InstanceDetails (list) –

            The instance details for this recommendation, including instance type, count, and model copies per instance.

            • (dict) –

              Instance details for a recommendation.

              • InstanceType (string) –

                The recommended instance type.

              • InstanceCount (integer) –

                The recommended number of instances.

              • CopyCountPerInstance (integer) –

                The number of model copies per instance.

        • DeploymentConfiguration (dict) –

          The deployment configuration for this recommendation, including the container image, instance type, instance count, and environment variables.

          • S3 (list) –

            The Amazon S3 data channels for the deployment.

            • (dict) –

              An Amazon S3 data channel for a recommended deployment configuration, containing model artifacts or optimized model outputs.

              • ChannelName (string) –

                A custom name for this Amazon S3 data channel.

              • Uri (string) –

                The Amazon S3 URI of the data for this channel.

          • ImageUri (string) –

            The URI of the container image for the deployment.

          • InstanceType (string) –

            The recommended instance type for the deployment.

          • InstanceCount (integer) –

            The recommended number of instances for the deployment.

          • CopyCountPerInstance (integer) –

            The number of model copies per instance.

          • EnvironmentVariables (dict) –

            The environment variables for the deployment.

            • (string) –

              • (string) –

        • AIBenchmarkJobArn (string) –

          The Amazon Resource Name (ARN) of the benchmark job associated with this recommendation.

        • ExpectedPerformance (list) –

          The expected performance metrics for this recommendation.

          • (dict) –

            An expected performance metric for a recommendation.

            • Metric (string) –

              The name of the performance metric.

            • Stat (string) –

              The statistical measure for the metric.

            • Value (string) –

              The value of the metric.

            • Unit (string) –

              The unit of the metric value.

    • RoleArn (string) –

      The Amazon Resource Name (ARN) of the IAM role used by the recommendation job.

    • ComputeSpec (dict) –

      The compute resource specification for the recommendation job.

      • InstanceTypes (list) –

        The list of instance types to consider for recommendations. You can specify up to 3 instance types.

        • (string) –

      • CapacityReservationConfig (dict) –

        The capacity reservation configuration.

        • CapacityReservationPreference (string) –

          The capacity reservation preference. The only valid value is capacity-reservations-only.

        • MlReservationArns (list) –

          The list of ML reservation ARNs to use.

          • (string) –

    • CreationTime (datetime) –

      A timestamp that indicates when the recommendation job was created.

    • StartTime (datetime) –

      A timestamp that indicates when the recommendation job started running.

    • EndTime (datetime) –

      A timestamp that indicates when the recommendation job completed.

    • Tags (list) –

      The tags associated with the recommendation job.

      • (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) –

          The tag key. Tag keys must be unique per resource.

        • Value (string) –

          The tag value.

Exceptions