Skip to content

Commit e03bf73

Browse files
committed
black, pylint
1 parent f0c10a5 commit e03bf73

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/sagemaker/estimator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,12 @@ def prepare_workflow_for_training(self, job_name=None):
329329
self._prepare_for_training(job_name=job_name)
330330

331331
def _ensure_base_job_name(self):
332+
"""Set ``self.base_job_name`` if it is not set already."""
332333
# honor supplied base_job_name or generate it
333334
if self.base_job_name:
334335
return
335-
elif isinstance(self, sagemaker.algorithm.AlgorithmEstimator):
336+
337+
if isinstance(self, sagemaker.algorithm.AlgorithmEstimator):
336338
self.base_job_name = self.algorithm_arn.split("/")[-1] # pylint: disable=no-member
337339
else:
338340
self.base_job_name = base_name_from_image(self.train_image())

tests/integ/test_mxnet_train.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,7 @@ def test_attach_deploy(mxnet_training_job, sagemaker_session, cpu_instance_type)
7171

7272

7373
def test_deploy_estimator_with_different_instance_types(
74-
mxnet_training_job,
75-
sagemaker_session,
76-
cpu_instance_type,
77-
alternative_cpu_instance_type,
74+
mxnet_training_job, sagemaker_session, cpu_instance_type, alternative_cpu_instance_type,
7875
):
7976
def _deploy_estimator_and_assert_instance_type(estimator, instance_type):
8077
# don't use timeout_and_delete_endpoint_by_name because this tests if
@@ -100,6 +97,7 @@ def _deploy_estimator_and_assert_instance_type(estimator, instance_type):
10097
return (model_name, endpoint_name, config_name)
10198

10299
estimator = MXNet.attach(mxnet_training_job, sagemaker_session)
100+
estimator.base_job_name = "test-mxnet-deploy-twice"
103101

104102
old_model_name, old_endpoint_name, old_config_name = _deploy_estimator_and_assert_instance_type(
105103
estimator, cpu_instance_type

0 commit comments

Comments
 (0)