Skip to content

Commit a83bed5

Browse files
authored
breaking: deprecate constants from defaults (#1590)
1 parent 66178b4 commit a83bed5

22 files changed

+98
-144
lines changed

src/sagemaker/chainer/defaults.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,4 @@
1313
"""Placeholder docstring"""
1414
from __future__ import absolute_import
1515

16-
CHAINER_VERSION = "4.1.0"
17-
"""Default Chainer version for when the framework version is not specified.
18-
This is no longer updated so as to not break existing workflows.
19-
"""
20-
21-
LATEST_VERSION = "5.0.0"
22-
"""The latest version of Chainer included in the SageMaker pre-built Docker images."""
23-
2416
LATEST_PY2_VERSION = "5.0.0"

src/sagemaker/chainer/estimator.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class Chainer(Framework):
4040
_process_slots_per_host = "sagemaker_process_slots_per_host"
4141
_additional_mpi_options = "sagemaker_additional_mpi_options"
4242

43-
LATEST_VERSION = defaults.LATEST_VERSION
44-
4543
def __init__(
4644
self,
4745
entry_point,

src/sagemaker/cli/mxnet.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
from __future__ import absolute_import
1515

1616
from sagemaker.cli.common import HostCommand, TrainCommand
17-
from sagemaker.mxnet import defaults
17+
18+
MXNET_VERSION = "1.2"
1819

1920

2021
def train(args):
@@ -42,7 +43,7 @@ def create_estimator(self):
4243

4344
return MXNet(
4445
entry_point=self.script,
45-
framework_version=defaults.MXNET_VERSION,
46+
framework_version=MXNET_VERSION,
4647
py_version=self.python,
4748
role=self.role_name,
4849
base_job_name=self.job_name,
@@ -66,7 +67,7 @@ def create_model(self, model_url):
6667
model_data=model_url,
6768
role=self.role_name,
6869
entry_point=self.script,
69-
framework_version=defaults.MXNET_VERSION,
70+
framework_version=MXNET_VERSION,
7071
py_version=self.python,
7172
name=self.endpoint_name,
7273
env=self.environment,

src/sagemaker/mxnet/defaults.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,4 @@
1313
"""Placeholder docstring"""
1414
from __future__ import absolute_import
1515

16-
MXNET_VERSION = "1.2"
17-
"""Default MXNet version for when the framework version is not specified.
18-
This is no longer updated so as to not break existing workflows.
19-
"""
20-
21-
LATEST_VERSION = "1.6.0"
22-
"""The latest version of MXNet included in the SageMaker pre-built Docker images."""
23-
2416
LATEST_PY2_VERSION = "1.6.0"

src/sagemaker/mxnet/estimator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ class MXNet(Framework):
3838
__framework_name__ = "mxnet"
3939
_LOWEST_SCRIPT_MODE_VERSION = ["1", "3"]
4040

41-
LATEST_VERSION = defaults.LATEST_VERSION
42-
4341
def __init__(
4442
self,
4543
entry_point,
@@ -115,7 +113,7 @@ def __init__(
115113
:class:`~sagemaker.estimator.EstimatorBase`.
116114
"""
117115
validate_version_or_image_args(framework_version, py_version, image_name)
118-
if py_version and py_version == "py2":
116+
if py_version == "py2":
119117
logger.warning(
120118
python_deprecation_warning(self.__framework_name__, defaults.LATEST_PY2_VERSION)
121119
)

src/sagemaker/mxnet/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __init__(
115115
:class:`~sagemaker.model.Model`.
116116
"""
117117
validate_version_or_image_args(framework_version, py_version, image)
118-
if py_version and py_version == "py2":
118+
if py_version == "py2":
119119
logger.warning(
120120
python_deprecation_warning(self.__framework_name__, defaults.LATEST_PY2_VERSION)
121121
)

src/sagemaker/pytorch/defaults.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,4 @@
1313
"""Placeholder docstring"""
1414
from __future__ import absolute_import
1515

16-
PYTORCH_VERSION = "0.4"
17-
"""Default PyTorch version for when the framework version is not specified.
18-
The default version is no longer updated so as to not break existing workflows.
19-
"""
20-
21-
LATEST_VERSION = "1.5.0"
22-
"""The latest version of PyTorch included in the SageMaker pre-built Docker images."""
23-
24-
PYTHON_VERSION = "py3"
25-
2616
LATEST_PY2_VERSION = "1.3.1"

src/sagemaker/pytorch/estimator.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ class PyTorch(Framework):
3535

3636
__framework_name__ = "pytorch"
3737

38-
LATEST_VERSION = defaults.LATEST_VERSION
39-
4038
def __init__(
4139
self,
4240
entry_point,

src/sagemaker/pytorch/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __init__(
114114
:class:`~sagemaker.model.Model`.
115115
"""
116116
validate_version_or_image_args(framework_version, py_version, image)
117-
if py_version and py_version == "py2":
117+
if py_version == "py2":
118118
logger.warning(
119119
python_deprecation_warning(self.__framework_name__, defaults.LATEST_PY2_VERSION)
120120
)

src/sagemaker/sklearn/defaults.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,3 @@
1414
from __future__ import absolute_import
1515

1616
SKLEARN_NAME = "scikit-learn"
17-
18-
SKLEARN_VERSION = "0.20.0"
19-
20-
LATEST_PY2_VERSION = "0.20.0"

0 commit comments

Comments
 (0)