Skip to content

Commit 0987f2b

Browse files
author
Verdi March
committed
Updated documents on internal framework processor payload
1 parent ffcfce6 commit 0987f2b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/sagemaker/processing.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,8 +1330,7 @@ def __init__(
13301330
self._CODE_CONTAINER_INPUT_NAME = "entrypoint"
13311331

13321332
self.code_location = (
1333-
code_location[:-1] if (code_location and code_location.endswith("/"))
1334-
else code_location
1333+
code_location[:-1] if (code_location and code_location.endswith("/")) else code_location
13351334
)
13361335

13371336
def _pre_init_normalization(
@@ -1488,7 +1487,7 @@ def run( # type: ignore[override]
14881487
"Local *code* is not currently supported for SageMaker Processing in Local Mode"
14891488
)
14901489
else:
1491-
# estimator
1490+
# estimator
14921491
entrypoint_s3_uri = estimator.uploaded_code.s3_prefix.replace(
14931492
"sourcedir.tar.gz",
14941493
"runproc.sh",
@@ -1557,13 +1556,13 @@ def _patch_inputs_with_payload(self, inputs, s3_payload) -> List[ProcessingInput
15571556
15581557
This method follows the same mechanism in ScriptProcessor.
15591558
"""
1560-
# ScriptProcessor job will download only s3://..../code/runproc.sh, hence we need to also
1561-
# inject our s3://.../sourcedir.tar.gz.
1559+
# Follow the exact same mechanism that ScriptProcessor does, which
1560+
# is to inject the S3 code artifact as a processing input. Note that
1561+
# framework processor take-over /opt/ml/processing/input/code for
1562+
# sourcedir.tar.gz, and let ScriptProcessor to place runproc.sh under
1563+
# /opt/ml/processing/input/{self._CODE_CONTAINER_INPUT_NAME}.
15621564
#
1563-
# We'll follow the exact same mechanism that ScriptProcessor does, which is to inject the
1564-
# S3 code artifact as a processing input with destination
1565-
# /opt/ml/processing/input/code/payload/. Note that source.dir.tar.gz cannot go to
1566-
# /opt/ml/processing/input/code because the ScriptProcessor has first-right-to-use. See:
1565+
# See:
15671566
# - ScriptProcessor._CODE_CONTAINER_BASE_PATH, ScriptProcessor._CODE_CONTAINER_INPUT_NAME.
15681567
# - https://github.com/aws/sagemaker-python-sdk/blob/ \
15691568
# a7399455f5386d83ddc5cb15c0db00c04bd518ec/src/sagemaker/processing.py#L425-L426

0 commit comments

Comments
 (0)