@@ -1330,8 +1330,7 @@ def __init__(
1330
1330
self ._CODE_CONTAINER_INPUT_NAME = "entrypoint"
1331
1331
1332
1332
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
1335
1334
)
1336
1335
1337
1336
def _pre_init_normalization (
@@ -1488,7 +1487,7 @@ def run( # type: ignore[override]
1488
1487
"Local *code* is not currently supported for SageMaker Processing in Local Mode"
1489
1488
)
1490
1489
else :
1491
- # estimator
1490
+ # estimator
1492
1491
entrypoint_s3_uri = estimator .uploaded_code .s3_prefix .replace (
1493
1492
"sourcedir.tar.gz" ,
1494
1493
"runproc.sh" ,
@@ -1557,13 +1556,13 @@ def _patch_inputs_with_payload(self, inputs, s3_payload) -> List[ProcessingInput
1557
1556
1558
1557
This method follows the same mechanism in ScriptProcessor.
1559
1558
"""
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}.
1562
1564
#
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:
1567
1566
# - ScriptProcessor._CODE_CONTAINER_BASE_PATH, ScriptProcessor._CODE_CONTAINER_INPUT_NAME.
1568
1567
# - https://github.com/aws/sagemaker-python-sdk/blob/ \
1569
1568
# a7399455f5386d83ddc5cb15c0db00c04bd518ec/src/sagemaker/processing.py#L425-L426
0 commit comments