airflow.providers.amazon.aws.sensors.sagemaker
¶
Module Contents¶
Classes¶
Contains general sensor behavior for SageMaker. |
|
Asks for the state of the endpoint state until it reaches a |
|
Asks for the state of the transform state until it reaches a |
|
Asks for the state of the tuning state until it reaches a terminal |
|
Asks for the state of the training state until it reaches a |
- class airflow.providers.amazon.aws.sensors.sagemaker.SageMakerBaseSensor(*, aws_conn_id='aws_default', **kwargs)[source]¶
Bases:
airflow.sensors.base.BaseSensorOperator
Contains general sensor behavior for SageMaker.
Subclasses should implement get_sagemaker_response() and state_from_response() methods. Subclasses should also implement NON_TERMINAL_STATES and FAILED_STATE methods.
- poke(self, context)[source]¶
Function that the sensors defined while deriving this class should override.
- abstract non_terminal_states(self)[source]¶
Placeholder for returning states with should not terminate.
- class airflow.providers.amazon.aws.sensors.sagemaker.SageMakerEndpointSensor(*, endpoint_name, **kwargs)[source]¶
Bases:
SageMakerBaseSensor
Asks for the state of the endpoint state until it reaches a terminal state. If it fails the sensor errors, the task fails.
- Parameters
job_name -- job_name of the endpoint instance to check the state of
- class airflow.providers.amazon.aws.sensors.sagemaker.SageMakerTransformSensor(*, job_name, **kwargs)[source]¶
Bases:
SageMakerBaseSensor
Asks for the state of the transform state until it reaches a terminal state. The sensor will error if the job errors, throwing a AirflowException containing the failure reason.
:param job_name: job_name of the transform job instance to check the state of
- class airflow.providers.amazon.aws.sensors.sagemaker.SageMakerTuningSensor(*, job_name, **kwargs)[source]¶
Bases:
SageMakerBaseSensor
Asks for the state of the tuning state until it reaches a terminal state. The sensor will error if the job errors, throwing a AirflowException containing the failure reason.
:param job_name: job_name of the tuning instance to check the state of :type job_name: str
- class airflow.providers.amazon.aws.sensors.sagemaker.SageMakerTrainingSensor(*, job_name, print_log=True, **kwargs)[source]¶
Bases:
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 -- name of the SageMaker training job to check the state of
print_log -- if the operator should print the cloudwatch log