This is an automated email from the ASF dual-hosted git repository.
vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 98c9bc72e5d Fix incorrect compute param example in
SageMakerNotebookHook docstring (#60247)
98c9bc72e5d is described below
commit 98c9bc72e5d2030dd24d8757f22d5912a9c04d14
Author: sagnjun-nam <[email protected]>
AuthorDate: Fri Jan 16 01:26:52 2026 +0900
Fix incorrect compute param example in SageMakerNotebookHook docstring
(#60247)
* Fix incorrect compute param example in SageMakerNotebookHook docstring
The compute parameter example incorrectly shows `image_uri` as a direct
field,
but the SageMaker Unified Studio API expects `image_details` with either
`ecr_uri` or `image_name`/`image_version` combination.
Reference:
https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/remote-execution-apis.html#remote-start-execution
* Fix incorrect compute param example in SageMakerNotebookHook docstring
The compute parameter example incorrectly shows `image_uri` as a direct
field,
but the SageMaker Unified Studio API expects `image_details` with either
`ecr_uri` or `image_name`/`image_version` combination.
Reference:
https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/remote-execution-apis.html#remote-start-execution
---
docs/spelling_wordlist.txt | 1 +
.../providers/amazon/aws/hooks/sagemaker_unified_studio.py | 9 ++++-----
.../providers/amazon/aws/operators/sagemaker_unified_studio.py | 5 ++---
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
index 36e369f2648..c3f5910eeec 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -593,6 +593,7 @@ dynload
ec
ecb
ECR
+ecr
ecs
EdDSA
edgeexecutor
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker_unified_studio.py
b/providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker_unified_studio.py
index 3fcaf0bf178..0895ffc3f8b 100644
---
a/providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker_unified_studio.py
+++
b/providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker_unified_studio.py
@@ -52,13 +52,12 @@ class SageMakerNotebookHook(BaseHook):
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 specify the output format.
Example: {'output_formats': ['NOTEBOOK']}
- :param compute: compute configuration to use for the notebook execution.
This is a required attribute
- if the execution is on a remote compute.
- Example: { "instance_type": "ml.m5.large", "volume_size_in_gb": 30,
"volume_kms_key_id": "", "image_uri": "string", "container_entrypoint": [
"string" ]}
+ :param compute: compute configuration to use for the notebook execution.
This is a required attribute if the execution is on a remote compute.
+ Example: {"instance_type": "ml.m5.large", "volume_size_in_gb": 30,
"volume_kms_key_id": "", "image_details": {"ecr_uri": "string"},
"container_entrypoint": ["string"]}
:param termination_condition: conditions to match to terminate the remote
execution.
- Example: { "MaxRuntimeInSeconds": 3600 }
+ Example: {"MaxRuntimeInSeconds": 3600}
:param tags: tags to be associated with the remote execution runs.
- Example: { "md_analytics": "logs" }
+ Example: {"md_analytics": "logs"}
:param waiter_delay: Interval in seconds to check the task execution
status.
:param waiter_max_attempts: Number of attempts to wait before returning
FAILED.
"""
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker_unified_studio.py
b/providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker_unified_studio.py
index 6761af3e049..85de6dd1c42 100644
---
a/providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker_unified_studio.py
+++
b/providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker_unified_studio.py
@@ -63,9 +63,8 @@ class SageMakerNotebookOperator(BaseOperator):
:param output_config: Configuration for the output format. It should
include an output_format parameter to control
the format of the notebook execution output.
Example: {"output_formats": ["NOTEBOOK"]}
- :param compute: compute configuration to use for the artifact execution.
This is a required attribute
- if the execution is on a remote compute.
- Example: { "InstanceType": "ml.m5.large", "VolumeSizeInGB": 30,
"VolumeKmsKeyId": "", "ImageUri": "string", "ContainerEntrypoint": [ "string" ]}
+ :param compute: compute configuration to use for the notebook execution.
This is a required attribute if the execution is on a remote compute.
+ Example: {"instance_type": "ml.m5.large", "volume_size_in_gb": 30,
"volume_kms_key_id": "", "image_details": {"ecr_uri": "string"},
"container_entrypoint": ["string"]}
:param termination_condition: conditions to match to terminate the remote
execution.
Example: { "MaxRuntimeInSeconds": 3600 }
:param tags: tags to be associated with the remote execution runs.