Skip to content

Commit 62c98f6

Browse files
authored
fix: create default bucket only if needed (#1980)
1 parent 2e01a9e commit 62c98f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sagemaker/workflow/airflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ def training_base_config(estimator, inputs=None, job_name=None, mini_batch_size=
143143
else:
144144
estimator.prepare_workflow_for_training(job_name=job_name)
145145

146-
default_bucket = estimator.sagemaker_session.default_bucket()
147146
s3_operations = {}
148147

149148
if job_name is not None:
@@ -155,6 +154,7 @@ def training_base_config(estimator, inputs=None, job_name=None, mini_batch_size=
155154
estimator._current_job_name = utils.name_from_base(base_name)
156155

157156
if estimator.output_path is None:
157+
default_bucket = estimator.sagemaker_session.default_bucket()
158158
estimator.output_path = "s3://{}/".format(default_bucket)
159159

160160
if isinstance(estimator, sagemaker.estimator.Framework):

0 commit comments

Comments
 (0)