@@ -1478,27 +1478,26 @@ def run( # type: ignore[override]
14781478 inputs , estimator ._hyperparameters ["sagemaker_submit_directory" ]
14791479 )
14801480
1481- # Upload the bootstrapping code as s3://.../jobname/source/runproc.sh.
14821481 local_code = get_config_value ("local.local_code" , self .sagemaker_session .config )
14831482 if self .sagemaker_session .local_mode and local_code :
14841483 # TODO: Can we be more prescriptive about how to not trigger this error?
14851484 # How can user or us force a local mode `Estimator` to run with `local_code=False`?
14861485 raise RuntimeError (
14871486 "Local *code* is not currently supported for SageMaker Processing in Local Mode"
14881487 )
1489- else :
1490- # estimator
1491- entrypoint_s3_uri = estimator .uploaded_code .s3_prefix .replace (
1492- "sourcedir.tar.gz" ,
1493- "runproc.sh" ,
1494- )
1495- script = estimator .uploaded_code .script_name
1496- s3_runproc_sh = S3Uploader .upload_string_as_file_body (
1497- self .runproc_sh .format (entry_point = script ),
1498- desired_s3_uri = entrypoint_s3_uri ,
1499- sagemaker_session = self .sagemaker_session ,
1500- )
1501- logger .info ("runproc.sh uploaded to %s" , s3_runproc_sh )
1488+
1489+ # Upload the bootstrapping code as s3://.../jobname/source/runproc.sh.
1490+ entrypoint_s3_uri = estimator .uploaded_code .s3_prefix .replace (
1491+ "sourcedir.tar.gz" ,
1492+ "runproc.sh" ,
1493+ )
1494+ script = estimator .uploaded_code .script_name
1495+ s3_runproc_sh = S3Uploader .upload_string_as_file_body (
1496+ self .runproc_sh .format (entry_point = script ),
1497+ desired_s3_uri = entrypoint_s3_uri ,
1498+ sagemaker_session = self .sagemaker_session ,
1499+ )
1500+ logger .info ("runproc.sh uploaded to %s" , s3_runproc_sh )
15021501
15031502 # Submit a processing job.
15041503 super ().run (
0 commit comments