o-nikolas commented on code in PR #45726:
URL: https://github.com/apache/airflow/pull/45726#discussion_r1919248414
##
providers/src/airflow/providers/amazon/aws/hooks/sagemaker_unified_studio.py:
##
@@ -0,0 +1,185 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""This module contains the Amazon SageMaker Unified Studio Notebook hook."""
+
+import time
+
+from airflow import AirflowException
+from airflow.hooks.base import BaseHook
+from sagemaker_studio import ClientConfig
+from sagemaker_studio._openapi.models import GetExecutionRequest,
StartExecutionRequest
+from sagemaker_studio.sagemaker_studio_api import SageMakerStudioAPI
+
+from airflow.providers.amazon.aws.utils.sagemaker_unified_studio import
is_local_runner
+
+
+class SageMakerNotebookHook(BaseHook):
+"""
+Interact with the Sagemaker Workflows API.
+
+This hook provides a wrapper around the Sagemaker Workflows Notebook
Execution API.
+
+Examples:
+ .. code-block:: python
+
+from workflows.airflow.providers.amazon.aws.hooks.notebook_hook import
NotebookHook
+
+notebook_hook = NotebookHook(
+input_config={'input_path': 'path/to/notebook.ipynb',
'input_params': {'param1': 'value1'}},
+output_config={'output_uri': 'folder/output/location/prefix',
'output_format': 'ipynb'},
+execution_name='notebook_execution',
+poll_interval=10,
+)
+:param execution_name: The name of the notebook job to be executed, this
is same as task_id.
+:param input_config: Configuration for the input file.
+Example: {'input_path': 'folder/input/notebook.ipynb', 'input_params':
{'param1': 'value1'}}
+:param output_config: Configuration for the output format. It should
include an output_formats parameter to control
Review Comment:
This sentence seems to just tail off in the middle?
##
providers/src/airflow/providers/amazon/aws/hooks/sagemaker_unified_studio.py:
##
@@ -0,0 +1,185 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""This module contains the Amazon SageMaker Unified Studio Notebook hook."""
+
+import time
+
+from airflow import AirflowException
+from airflow.hooks.base import BaseHook
+from sagemaker_studio import ClientConfig
+from sagemaker_studio._openapi.models import GetExecutionRequest,
StartExecutionRequest
+from sagemaker_studio.sagemaker_studio_api import SageMakerStudioAPI
+
+from airflow.providers.amazon.aws.utils.sagemaker_unified_studio import
is_local_runner
+
+
+class SageMakerNotebookHook(BaseHook):
+"""
+Interact with the Sagemaker Workflows API.
+
+This hook provides a wrapper around the Sagemaker Workflows Notebook
Execution API.
+
+Examples:
+ .. code-block:: python
+
+from workflows.airflow.providers.amazon.aws.hooks.notebook_hook import
NotebookHook
+
+notebook_hook = NotebookHook(
+input_config={'input_path': 'path/to/notebook.ipynb',
'input_params': {'param1': 'value1'}},
+output_config={'output_uri': 'folder/output/location/prefix',
'output_format': 'ipynb'},
+execution_name='notebook_execution',
+poll_interval=10,
+)
+:param execution_name: The name of the notebook job to be executed, this
is same as task_id.
+:param input_config: Configuration for the input file.
+Example: {'input_path': 'folder/input/notebook.ipynb', 'input_params':
{'param1': 'value1'}}
+:param output_co