@@ -213,11 +213,9 @@ def _normalize_inputs(self, inputs=None):
213
213
# and save the S3 uri in the ProcessingInput source.
214
214
parse_result = urlparse (file_input .source )
215
215
if parse_result .scheme != "s3" :
216
- desired_s3_uri = os .path .join (
217
- "s3://" ,
216
+ desired_s3_uri = "s3://{}/{}/input/{}" .format (
218
217
self .sagemaker_session .default_bucket (),
219
218
self ._current_job_name ,
220
- "input" ,
221
219
file_input .input_name ,
222
220
)
223
221
s3_uri = S3Uploader .upload (
@@ -259,11 +257,9 @@ def _normalize_outputs(self, outputs=None):
259
257
# If the output's destination is not an s3_uri, create one.
260
258
parse_result = urlparse (output .destination )
261
259
if parse_result .scheme != "s3" :
262
- s3_uri = os .path .join (
263
- "s3://" ,
260
+ s3_uri = "s3://{}/{}/output/{}" .format (
264
261
self .sagemaker_session .default_bucket (),
265
262
self ._current_job_name ,
266
- "output" ,
267
263
output .output_name ,
268
264
)
269
265
output .destination = s3_uri
@@ -475,11 +471,9 @@ def _upload_code(self, code):
475
471
str: The S3 URI of the uploaded file or directory.
476
472
477
473
"""
478
- desired_s3_uri = os .path .join (
479
- "s3://" ,
474
+ desired_s3_uri = "s3://{}/{}/input/{}" .format (
480
475
self .sagemaker_session .default_bucket (),
481
476
self ._current_job_name ,
482
- "input" ,
483
477
self ._CODE_CONTAINER_INPUT_NAME ,
484
478
)
485
479
return S3Uploader .upload (
0 commit comments