From 861aa604cdc5d36da9ab0fb8bff00ec08b54dca5 Mon Sep 17 00:00:00 2001 From: Lauren Yu <6631887+laurenyu@users.noreply.github.com> Date: Wed, 22 Apr 2020 11:51:52 -0700 Subject: [PATCH] fix: use format strings intead of os.path.join for paths intended for Linux Docker containers --- src/sagemaker/processing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sagemaker/processing.py b/src/sagemaker/processing.py index 4cf5c8c432..6d28ae1f4b 100644 --- a/src/sagemaker/processing.py +++ b/src/sagemaker/processing.py @@ -495,7 +495,7 @@ def _convert_code_and_add_to_inputs(self, inputs, s3_uri): """ code_file_input = ProcessingInput( source=s3_uri, - destination=os.path.join( + destination="{}{}".format( self._CODE_CONTAINER_BASE_PATH, self._CODE_CONTAINER_INPUT_NAME ), input_name=self._CODE_CONTAINER_INPUT_NAME, @@ -508,7 +508,7 @@ def _set_entrypoint(self, command, user_script_name): Args: user_script_name (str): A filename with an extension. """ - user_script_location = os.path.join( + user_script_location = "{}{}/{}".format( self._CODE_CONTAINER_BASE_PATH, self._CODE_CONTAINER_INPUT_NAME, user_script_name ) self.entrypoint = command + [user_script_location]