Skip to content

fix: correct airflow workflow for BYO estimators. #1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions src/sagemaker/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def model_data(self):
)["ModelArtifacts"]["S3ModelArtifacts"]
else:
logging.warning(
"No finished training job found associated with this estimator. Please make sure"
"No finished training job found associated with this estimator. Please make sure "
"this estimator is only used for building workflow config"
)
model_uri = os.path.join(
Expand Down Expand Up @@ -718,21 +718,20 @@ def transformer(

if self.latest_training_job is None:
logging.warning(
"No finished training job found associated with this estimator. Please make sure"
"No finished training job found associated with this estimator. Please make sure "
"this estimator is only used for building workflow config"
)
model_name = self._current_job_name
else:
model_name = self.latest_training_job.name
model = self.create_model(vpc_config_override=vpc_config_override)

model = self.create_model(vpc_config_override=vpc_config_override)
# not all create_model() implementations have the same kwargs
model.name = model_name
if role is not None:
model.role = role

# not all create_model() implementations have the same kwargs
model.name = model_name
if role is not None:
model.role = role

model._create_sagemaker_model(instance_type, tags=tags)
model._create_sagemaker_model(instance_type, tags=tags)

return Transformer(
model_name,
Expand Down Expand Up @@ -1716,7 +1715,7 @@ def transformer(
transform_env.update(env)
else:
logging.warning(
"No finished training job found associated with this estimator. Please make sure"
"No finished training job found associated with this estimator. Please make sure "
"this estimator is only used for building workflow config"
)
model_name = self._current_job_name
Expand Down