SageMakerTrainingOperator

Amazon

Starts a model training job. After training completes, Amazon SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify.

View on GitHub

Last Updated: Feb. 27, 2023

Access Instructions

Install the Amazon provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

configRequiredThe configuration necessary to start a training job (templated). For details of the configuration parameter see SageMaker.Client.create_training_job()
aws_conn_idThe AWS connection ID to use.
wait_for_completionIf wait is set to True, the time interval, in seconds, that the operation waits to check the status of the training job.
print_logif the operator should print the cloudwatch log during training
check_intervalif wait is set to be true, this is the time interval in seconds which the operator will check the status of the training job
max_ingestion_timeIf wait is set to True, the operation fails if the training job doesn’t finish within max_ingestion_time seconds. If you set this parameter to None, the operation does not timeout.
check_if_job_existsIf set to true, then the operator will check whether a training job already exists for the name in the config.
action_if_job_existsBehaviour if the job name already exists. Possible options are “timestamp” (default), “increment” (deprecated) and “fail”. This is only relevant if check_if_job_exists is True.
Dict

Documentation

Starts a model training job. After training completes, Amazon SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify.

See also

For more information on how to use this operator, take a look at the guide: Create an Amazon SageMaker training job

Was this page helpful?