Skip to content

Commit 06a00d4

Browse files
authored
fix: use format strings intead of os.path.join for Unix paths for Processing Jobs (#1435)
When using the Python SDK to construct paths for Docker containers, no matter what the user's platform is, we still expect the Docker container to use Ubuntu (since that's what all the prebuilt SageMaker images use).
1 parent dba0ef9 commit 06a00d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sagemaker/processing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def _convert_code_and_add_to_inputs(self, inputs, s3_uri):
495495
"""
496496
code_file_input = ProcessingInput(
497497
source=s3_uri,
498-
destination=os.path.join(
498+
destination="{}{}".format(
499499
self._CODE_CONTAINER_BASE_PATH, self._CODE_CONTAINER_INPUT_NAME
500500
),
501501
input_name=self._CODE_CONTAINER_INPUT_NAME,
@@ -508,7 +508,7 @@ def _set_entrypoint(self, command, user_script_name):
508508
Args:
509509
user_script_name (str): A filename with an extension.
510510
"""
511-
user_script_location = os.path.join(
511+
user_script_location = "{}{}/{}".format(
512512
self._CODE_CONTAINER_BASE_PATH, self._CODE_CONTAINER_INPUT_NAME, user_script_name
513513
)
514514
self.entrypoint = command + [user_script_location]

0 commit comments

Comments
 (0)