@@ -1478,27 +1478,26 @@ def run( # type: ignore[override]
1478
1478
inputs , estimator ._hyperparameters ["sagemaker_submit_directory" ]
1479
1479
)
1480
1480
1481
- # Upload the bootstrapping code as s3://.../jobname/source/runproc.sh.
1482
1481
local_code = get_config_value ("local.local_code" , self .sagemaker_session .config )
1483
1482
if self .sagemaker_session .local_mode and local_code :
1484
1483
# TODO: Can we be more prescriptive about how to not trigger this error?
1485
1484
# How can user or us force a local mode `Estimator` to run with `local_code=False`?
1486
1485
raise RuntimeError (
1487
1486
"Local *code* is not currently supported for SageMaker Processing in Local Mode"
1488
1487
)
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 )
1502
1501
1503
1502
# Submit a processing job.
1504
1503
super ().run (
0 commit comments