airflow.providers.amazon.aws.sensors.sagemaker_unified_studio_notebook¶
This module contains the Amazon SageMaker Unified Studio Notebook Run sensor.
This sensor polls the DataZone GetNotebookRun API until the notebook run reaches a terminal state.
Classes¶
Polls a SageMaker Unified Studio notebook execution until it reaches a terminal state. |
Module Contents¶
- class airflow.providers.amazon.aws.sensors.sagemaker_unified_studio_notebook.SageMakerUnifiedStudioNotebookSensor(*, domain_identifier, owning_project_identifier, notebook_run_id, notebook_identifier, endpoint_url=None, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.sensors.base_aws.AwsBaseSensor[airflow.providers.amazon.aws.hooks.sagemaker_unified_studio_notebook.SageMakerUnifiedStudioNotebookHook]Polls a SageMaker Unified Studio notebook execution until it reaches a terminal state.
‘SUCCEEDED’, ‘FAILED’, ‘STOPPED’
- Examples:
from airflow.providers.amazon.aws.sensors.sagemaker_unified_studio_notebook import ( SageMakerUnifiedStudioNotebookSensor, ) notebook_sensor = SageMakerUnifiedStudioNotebookSensor( task_id="wait_for_notebook", domain_identifier="dzd_example", owning_project_identifier="proj_example", notebook_run_id="nr-1234567890", )
- Parameters:
domain_identifier (str) – The ID of the SageMaker Unified Studio domain containing the notebook.
owning_project_identifier (str) – The ID of the SageMaker Unified Studio project containing the notebook.
notebook_run_id (str) – The ID of the notebook run to monitor. This is returned by the
SageMakerUnifiedStudioNotebookOperator.notebook_identifier (str) – The ID of the notebook that was executed. Required to read notebook outputs from S3 after the run completes.
- template_fields: collections.abc.Sequence[str][source]¶