Skip to content

create_auto_ml_job async

create_auto_ml_job(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    auto_ml_job_name: Optional[AutoMLJobName] = None,
    input_data_config: Optional[AutoMLInputDataConfig] = None,
    output_data_config: Optional[AutoMLOutputDataConfig] = None,
    problem_type: Optional[ProblemType] = None,
    auto_ml_job_objective: Optional[AutoMLJobObjective] = None,
    auto_ml_job_config: Optional[AutoMLJobConfig] = None,
    role_arn: Optional[RoleArn] = None,
    generate_candidate_definitions_only: Optional[
        GenerateCandidateDefinitionsOnly
    ] = None,
    tags: Optional[TagList] = None,
    model_deploy_config: Optional[ModelDeployConfig] = None,
) -> CreateAutoMLJobResponse

Creates an Autopilot job also referred to as Autopilot experiment or AutoML job.

An AutoML job in SageMaker AI is a fully automated process that allows you to build machine learning models with minimal effort and machine learning expertise. When initiating an AutoML job, you provide your data and optionally specify parameters tailored to your use case. SageMaker AI then automates the entire model development lifecycle, including data preprocessing, model training, tuning, and evaluation. AutoML jobs are designed to simplify and accelerate the model building process by automating various tasks and exploring different combinations of machine learning algorithms, data preprocessing techniques, and hyperparameter values. The output of an AutoML job comprises one or more trained models ready for deployment and inference. Additionally, SageMaker AI AutoML jobs generate a candidate model leaderboard, allowing you to select the best-performing model for deployment.

For more information about AutoML jobs, see https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html in the SageMaker AI developer guide.

We recommend using the new versions CreateAutoMLJobV2 and DescribeAutoMLJobV2, which offer backward compatibility.

CreateAutoMLJobV2 can manage tabular problem types identical to those of its previous version CreateAutoMLJob, as well as time-series forecasting, non-tabular problem types such as image or text classification, and text generation (LLMs fine-tuning).

Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2.

You can find the best-performing model after you run an AutoML job by calling DescribeAutoMLJobV2 (recommended) or DescribeAutoMLJob.

Parameters:

  • auto_ml_job_name (Optional[AutoMLJobName], default: None ) –

    Identifies an Autopilot job. The name must be unique to your account and is case insensitive.

  • input_data_config (Optional[AutoMLInputDataConfig], default: None ) –

    An array of channel objects that describes the input data and its location. Each channel is a named input source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is required for the training dataset. There is not a minimum number of rows required for the validation dataset.

  • output_data_config (Optional[AutoMLOutputDataConfig], default: None ) –

    Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV.

  • problem_type (Optional[ProblemType], default: None ) –

    Defines the type of supervised learning problem available for the candidates. For more information, see SageMaker Autopilot problem types.

  • auto_ml_job_objective (Optional[AutoMLJobObjective], default: None ) –

    Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. See AutoMLJobObjective for the default values.

  • auto_ml_job_config (Optional[AutoMLJobConfig], default: None ) –

    A collection of settings used to configure an AutoML job.

  • role_arn (Optional[RoleArn], default: None ) –

    The ARN of the role that is used to access the data.

  • generate_candidate_definitions_only (Optional[GenerateCandidateDefinitionsOnly], default: None ) –

    Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.

  • tags (Optional[TagList], default: None ) –

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web ServicesResources. Tag keys must be unique per resource.

  • model_deploy_config (Optional[ModelDeployConfig], default: None ) –

    Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.

Raises:

  • ResourceInUse –

    Resource being accessed is in use.

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def create_auto_ml_job(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    auto_ml_job_name: Optional[
        "capo_sagemaker.types.auto_ml_job_name.AutoMLJobName"
    ] = None,
    input_data_config: Optional[
        "capo_sagemaker.types.auto_ml_input_data_config.AutoMLInputDataConfig"
    ] = None,
    output_data_config: Optional[
        "capo_sagemaker.types.auto_ml_output_data_config.AutoMLOutputDataConfig"
    ] = None,
    problem_type: Optional["capo_sagemaker.types.problem_type.ProblemType"] = None,
    auto_ml_job_objective: Optional[
        "capo_sagemaker.types.auto_ml_job_objective.AutoMLJobObjective"
    ] = None,
    auto_ml_job_config: Optional[
        "capo_sagemaker.types.auto_ml_job_config.AutoMLJobConfig"
    ] = None,
    role_arn: Optional["capo_sagemaker.types.role_arn.RoleArn"] = None,
    generate_candidate_definitions_only: Optional[
        "capo_sagemaker.types.generate_candidate_definitions_only.GenerateCandidateDefinitionsOnly"
    ] = None,
    tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
    model_deploy_config: Optional[
        "capo_sagemaker.types.model_deploy_config.ModelDeployConfig"
    ] = None,
) -> "capo_sagemaker.types.create_auto_ml_job_response.CreateAutoMLJobResponse":
    """<p>Creates an Autopilot job also referred to as Autopilot experiment or AutoML job.</p> <p>An AutoML job in SageMaker AI is a fully automated process that allows you to build machine learning models with minimal effort and machine learning expertise. When initiating an AutoML job, you provide your data and optionally specify parameters tailored to your use case. SageMaker AI then automates the entire model development lifecycle, including data preprocessing, model training, tuning, and evaluation. AutoML jobs are designed to simplify and accelerate the model building process by automating various tasks and exploring different combinations of machine learning algorithms, data preprocessing techniques, and hyperparameter values. The output of an AutoML job comprises one or more trained models ready for deployment and inference. Additionally, SageMaker AI AutoML jobs generate a candidate model leaderboard, allowing you to select the best-performing model for deployment.</p> <p>For more information about AutoML jobs, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html">https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html</a> in the SageMaker AI developer guide.</p> <note> <p>We recommend using the new versions <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJobV2.html">CreateAutoMLJobV2</a> and <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html">DescribeAutoMLJobV2</a>, which offer backward compatibility.</p> <p> <code>CreateAutoMLJobV2</code> can manage tabular problem types identical to those of its previous version <code>CreateAutoMLJob</code>, as well as time-series forecasting, non-tabular problem types such as image or text classification, and text generation (LLMs fine-tuning).</p> <p>Find guidelines about how to migrate a <code>CreateAutoMLJob</code> to <code>CreateAutoMLJobV2</code> in <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment.html#autopilot-create-experiment-api-migrate-v1-v2">Migrate a CreateAutoMLJob to CreateAutoMLJobV2</a>.</p> </note> <p>You can find the best-performing model after you run an AutoML job by calling <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html">DescribeAutoMLJobV2</a> (recommended) or <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJob.html">DescribeAutoMLJob</a>.</p>

    Args:
        auto_ml_job_name: <p>Identifies an Autopilot job. The name must be unique to your account and is case insensitive.</p>
        input_data_config: <p>An array of channel objects that describes the input data and its location. Each channel is a named input source. Similar to <code>InputDataConfig</code> supported by <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTrainingJobDefinition.html">HyperParameterTrainingJobDefinition</a>. Format(s) supported: CSV, Parquet. A minimum of 500 rows is required for the training dataset. There is not a minimum number of rows required for the validation dataset.</p>
        output_data_config: <p>Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV.</p>
        problem_type: <p>Defines the type of supervised learning problem available for the candidates. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-datasets-problem-types.html#autopilot-problem-types"> SageMaker Autopilot problem types</a>.</p>
        auto_ml_job_objective: <p>Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. See <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AutoMLJobObjective.html">AutoMLJobObjective</a> for the default values.</p>
        auto_ml_job_config: <p>A collection of settings used to configure an AutoML job.</p>
        role_arn: <p>The ARN of the role that is used to access the data.</p>
        generate_candidate_definitions_only: <p>Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.</p>
        tags: <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web ServicesResources</a>. Tag keys must be unique per resource.</p>
        model_deploy_config: <p>Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.</p>

    Raises:
        capo_sagemaker.errors.resource_in_use.ResourceInUse: <p>Resource being accessed is in use.</p>
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.create_auto_ml_job_request.CreateAutoMLJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.create_auto_ml_job_response.CreateAutoMLJobResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.create_auto_ml_job

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.create_auto_ml_job.async_create_auto_ml_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateAutoMLJob")
    )
    input_: capo_sagemaker.types.create_auto_ml_job_request.CreateAutoMLJobRequest = {}
    if auto_ml_job_name is not None:
        input_["auto_ml_job_name"] = auto_ml_job_name
    if input_data_config is not None:
        input_["input_data_config"] = input_data_config
    if output_data_config is not None:
        input_["output_data_config"] = output_data_config
    if problem_type is not None:
        input_["problem_type"] = problem_type
    if auto_ml_job_objective is not None:
        input_["auto_ml_job_objective"] = auto_ml_job_objective
    if auto_ml_job_config is not None:
        input_["auto_ml_job_config"] = auto_ml_job_config
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if generate_candidate_definitions_only is not None:
        input_["generate_candidate_definitions_only"] = (
            generate_candidate_definitions_only
        )
    if tags is not None:
        input_["tags"] = tags
    if model_deploy_config is not None:
        input_["model_deploy_config"] = model_deploy_config

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output