airflow.contrib.sensors.sagemaker_training_sensor

Module Contents

class airflow.contrib.sensors.sagemaker_training_sensor.SageMakerTrainingSensor(job_name, print_log=True, *args, **kwargs)[source]

Bases: airflow.contrib.sensors.sagemaker_base_sensor.SageMakerBaseSensor

Asks for the state of the training state until it reaches a terminal state. If it fails the sensor errors, failing the task.

Parameters
  • job_name (str) – name of the SageMaker training job to check the state of

  • print_log (bool) – if the operator should print the cloudwatch log

template_fields = ['job_name'][source]
template_ext = [][source]
init_log_resource(self, hook)[source]
non_terminal_states(self)[source]
failed_states(self)[source]
get_sagemaker_response(self)[source]
get_failed_reason_from_response(self, response)[source]
state_from_response(self, response)[source]