Skip to content

CreateOptimizationJobRequest

Source code in docs_src/capo_sagemaker/types/create_optimization_job_request.py
class CreateOptimizationJobRequest(TypedDict, closed=True):
    optimization_job_name: NotRequired["capo_sagemaker.types.entity_name.EntityName"]
    """<p>A custom name for the new optimization job.</p>"""
    role_arn: NotRequired["capo_sagemaker.types.role_arn.RoleArn"]
    """<p>The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. </p> <p>During model optimization, Amazon SageMaker AI needs your permission to:</p> <ul> <li> <p>Read input data from an S3 bucket</p> </li> <li> <p>Write model artifacts to an S3 bucket</p> </li> <li> <p>Write logs to Amazon CloudWatch Logs</p> </li> <li> <p>Publish metrics to Amazon CloudWatch</p> </li> </ul> <p>You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker AI, the caller of this API must have the <code>iam:PassRole</code> permission. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">Amazon SageMaker AI Roles.</a> </p>"""
    model_source: NotRequired[
        "capo_sagemaker.types.optimization_job_model_source.OptimizationJobModelSource"
    ]
    """<p>The location of the source model to optimize with an optimization job.</p>"""
    deployment_instance_type: NotRequired[
        "capo_sagemaker.types.optimization_job_deployment_instance_type.OptimizationJobDeploymentInstanceType"
    ]
    """<p>The type of instance that hosts the optimized model that you create with the optimization job.</p>"""
    max_instance_count: NotRequired[
        "capo_sagemaker.types.optimization_job_max_instance_count.OptimizationJobMaxInstanceCount"
    ]
    """<p>The maximum number of instances to use for the optimization job.</p>"""
    optimization_environment: NotRequired[
        "capo_sagemaker.types.optimization_job_environment_variables.OptimizationJobEnvironmentVariables"
    ]
    """<p>The environment variables to set in the model container.</p>"""
    optimization_configs: NotRequired[
        "capo_sagemaker.types.optimization_configs.OptimizationConfigs"
    ]
    """<p>Settings for each of the optimization techniques that the job applies.</p>"""
    output_config: NotRequired[
        "capo_sagemaker.types.optimization_job_output_config.OptimizationJobOutputConfig"
    ]
    """<p>Details for where to store the optimized model that you create with the optimization job.</p>"""
    stopping_condition: NotRequired[
        "capo_sagemaker.types.stopping_condition.StoppingCondition"
    ]
    tags: NotRequired["capo_sagemaker.types.tag_list.TagList"]
    """<p>A list of key-value pairs associated with the optimization job. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>"""
    vpc_config: NotRequired[
        "capo_sagemaker.types.optimization_vpc_config.OptimizationVpcConfig"
    ]
    """<p>A VPC in Amazon VPC that your optimized model has access to.</p>"""
    training_plan_arns: NotRequired[
        "capo_sagemaker.types.optimization_job_training_plan_arns.OptimizationJobTrainingPlanArns"
    ]
    """<p>The Amazon Resource Name (ARN) of the training plan to use for this optimization job.</p> <p>When you use reserved capacity from a training plan, the optimization job runs on that reserved capacity instead of on-demand capacity. If you omit this field, the job uses on-demand capacity. You can specify at most one training plan.</p> <p>For more information about how to reserve GPU capacity for your optimization jobs using Amazon SageMaker Training Plans, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/reserve-capacity-with-training-plans.html">Reserve capacity with training plans</a>.</p>"""

deployment_instance_type instance-attribute

deployment_instance_type: NotRequired[OptimizationJobDeploymentInstanceType]

The type of instance that hosts the optimized model that you create with the optimization job.

max_instance_count instance-attribute

max_instance_count: NotRequired[OptimizationJobMaxInstanceCount]

The maximum number of instances to use for the optimization job.

model_source instance-attribute

model_source: NotRequired[OptimizationJobModelSource]

The location of the source model to optimize with an optimization job.

optimization_configs instance-attribute

optimization_configs: NotRequired[OptimizationConfigs]

Settings for each of the optimization techniques that the job applies.

optimization_environment instance-attribute

optimization_environment: NotRequired[OptimizationJobEnvironmentVariables]

The environment variables to set in the model container.

optimization_job_name instance-attribute

optimization_job_name: NotRequired[EntityName]

A custom name for the new optimization job.

output_config instance-attribute

output_config: NotRequired[OptimizationJobOutputConfig]

Details for where to store the optimized model that you create with the optimization job.

role_arn instance-attribute

role_arn: NotRequired[RoleArn]

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.

During model optimization, Amazon SageMaker AI needs your permission to:

  • Read input data from an S3 bucket

  • Write model artifacts to an S3 bucket

  • Write logs to Amazon CloudWatch Logs

  • Publish metrics to Amazon CloudWatch

You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker AI, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker AI Roles.

stopping_condition instance-attribute

stopping_condition: NotRequired[StoppingCondition]

tags instance-attribute

tags: NotRequired[TagList]

A list of key-value pairs associated with the optimization job. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.

training_plan_arns instance-attribute

training_plan_arns: NotRequired[OptimizationJobTrainingPlanArns]

The Amazon Resource Name (ARN) of the training plan to use for this optimization job.

When you use reserved capacity from a training plan, the optimization job runs on that reserved capacity instead of on-demand capacity. If you omit this field, the job uses on-demand capacity. You can specify at most one training plan.

For more information about how to reserve GPU capacity for your optimization jobs using Amazon SageMaker Training Plans, see Reserve capacity with training plans.

vpc_config instance-attribute

vpc_config: NotRequired[OptimizationVpcConfig]

A VPC in Amazon VPC that your optimized model has access to.