Skip to content

Commit dbbc563

Browse files
authored
Merge branch 'master' into job-tags
2 parents 5418d5a + 7f13df0 commit dbbc563

File tree

5 files changed

+28
-38
lines changed

5 files changed

+28
-38
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ CHANGELOG
55
1.3.dev1
66
========
77

8+
* bug-fix: Remove __all__ and add noqa in __init__
89
* bug-fix: Estimators: Change max_iterations hyperparameter key for KMeans
10+
* bug-fix: Estimators: Remove unused argument job_details for ``EstimatorBase.attach()``
911
* feature: Estimators: add support for tagging training jobs
1012

1113
1.3.0

src/sagemaker/__init__.py

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,23 @@
1212
# language governing permissions and limitations under the License.
1313
from __future__ import absolute_import
1414

15-
from sagemaker import estimator
16-
from sagemaker.amazon.kmeans import KMeans, KMeansModel, KMeansPredictor
17-
from sagemaker.amazon.pca import PCA, PCAModel, PCAPredictor
18-
from sagemaker.amazon.lda import LDA, LDAModel, LDAPredictor
19-
from sagemaker.amazon.linear_learner import LinearLearner, LinearLearnerModel, LinearLearnerPredictor
20-
from sagemaker.amazon.factorization_machines import FactorizationMachines, FactorizationMachinesModel
21-
from sagemaker.amazon.factorization_machines import FactorizationMachinesPredictor
22-
from sagemaker.amazon.ntm import NTM, NTMModel, NTMPredictor
23-
from sagemaker.amazon.randomcutforest import RandomCutForest, RandomCutForestModel, RandomCutForestPredictor
15+
from sagemaker import estimator # noqa: F401
16+
from sagemaker.amazon.kmeans import KMeans, KMeansModel, KMeansPredictor # noqa: F401
17+
from sagemaker.amazon.pca import PCA, PCAModel, PCAPredictor # noqa: F401
18+
from sagemaker.amazon.lda import LDA, LDAModel, LDAPredictor # noqa: F401
19+
from sagemaker.amazon.linear_learner import LinearLearner, LinearLearnerModel, LinearLearnerPredictor # noqa: F401
20+
from sagemaker.amazon.factorization_machines import FactorizationMachines, FactorizationMachinesModel # noqa: F401
21+
from sagemaker.amazon.factorization_machines import FactorizationMachinesPredictor # noqa: F401
22+
from sagemaker.amazon.ntm import NTM, NTMModel, NTMPredictor # noqa: F401
23+
from sagemaker.amazon.randomcutforest import (RandomCutForest, RandomCutForestModel, # noqa: F401
24+
RandomCutForestPredictor)
2425

25-
from sagemaker.local.local_session import LocalSession
26+
from sagemaker.local.local_session import LocalSession # noqa: F401
2627

27-
from sagemaker.model import Model
28-
from sagemaker.predictor import RealTimePredictor
29-
from sagemaker.session import Session
30-
from sagemaker.session import container_def
31-
from sagemaker.session import production_variant
32-
from sagemaker.session import s3_input
33-
from sagemaker.session import get_execution_role
34-
35-
36-
__all__ = ['estimator', 'KMeans', 'KMeansModel', 'KMeansPredictor', 'PCA', 'PCAModel', 'PCAPredictor', 'LinearLearner',
37-
'LinearLearnerModel', 'LinearLearnerPredictor',
38-
'LDA', 'LDAModel', 'LDAPredictor',
39-
'FactorizationMachines', 'FactorizationMachinesModel', 'FactorizationMachinesPredictor',
40-
'RandomCutForest', 'RandomCutForestModel', 'RandomCutForestPredictor',
41-
'Model', 'NTM', 'NTMModel', 'NTMPredictor', 'RealTimePredictor', 'Session', 'LocalSession',
42-
'container_def', 's3_input', 'production_variant', 'get_execution_role']
28+
from sagemaker.model import Model # noqa: F401
29+
from sagemaker.predictor import RealTimePredictor # noqa: F401
30+
from sagemaker.session import Session # noqa: F401
31+
from sagemaker.session import container_def # noqa: F401
32+
from sagemaker.session import production_variant # noqa: F401
33+
from sagemaker.session import s3_input # noqa: F401
34+
from sagemaker.session import get_execution_role # noqa: F401

src/sagemaker/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _from_training_job(cls, init_params, hyperparameters, image, sagemaker_sessi
186186
raise NotImplementedError()
187187

188188
@classmethod
189-
def attach(cls, training_job_name, sagemaker_session=None, job_details=None):
189+
def attach(cls, training_job_name, sagemaker_session=None):
190190
"""Attach to an existing training job.
191191
192192
Create an Estimator bound to an existing training job, each subclass is responsible to implement

src/sagemaker/mxnet/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
13-
from __future__ import absolute_import
13+
from __future__ import absolute_import # noqa: F401
1414

15-
from sagemaker.mxnet.estimator import MXNet
16-
from sagemaker.mxnet.model import MXNetModel, MXNetPredictor
17-
18-
__all__ = ['MXNet', 'MXNetModel', 'MXNetPredictor']
15+
from sagemaker.mxnet.estimator import MXNet # noqa: F401
16+
from sagemaker.mxnet.model import MXNetModel, MXNetPredictor # noqa: F401

src/sagemaker/tensorflow/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020
# classes for tensorflow serving. Currently tensorflow_serving_api can only be pip-installed for python 2.
2121
sys.path.append(os.path.dirname(__file__))
2222

23-
from distutils.version import LooseVersion # noqa: E402
24-
import tensorflow # noqa: E402
23+
from distutils.version import LooseVersion # noqa: E402, F401
24+
import tensorflow # noqa: E402, F401
2525

2626
if LooseVersion(tensorflow.__version__) < LooseVersion("1.3.0"):
2727
message = 'Tensorflow version must be >= 1.3.0. Current version: {}'.format(tensorflow.__version__)
2828
raise AssertionError(message)
2929

30-
from sagemaker.tensorflow.estimator import TensorFlow # noqa: E402
31-
from sagemaker.tensorflow.model import TensorFlowModel, TensorFlowPredictor # noqa: E402
32-
33-
__all__ = ['TensorFlow', 'TensorFlowModel', 'TensorFlowPredictor']
30+
from sagemaker.tensorflow.estimator import TensorFlow # noqa: E402, F401
31+
from sagemaker.tensorflow.model import TensorFlowModel, TensorFlowPredictor # noqa: E402, F401

0 commit comments

Comments
 (0)