Skip to content

Commit 2d1d5cf

Browse files
authored
Update default versions to TensorFlow 1.6 and MXNet 1.1 (#118)
* Update default TF and MXNet versions * Update changelog * Bump version to 1.2.0 due to TF / MXNet version changes * Reorder changelog entries * Update version info in README
1 parent 7ff630f commit 2d1d5cf

File tree

8 files changed

+67
-80
lines changed

8 files changed

+67
-80
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
CHANGELOG
33
=========
44

5-
1.1.dev4
5+
1.2.0
66
========
7-
* feature: Frameworks: Use more idiomatic ECR repository naming scheme
7+
88
* feature: Add Support for Local Mode
9+
* feature: Estimators: add support for TensorFlow 1.6.0
10+
* feature: Estimators: add support for MXNet 1.1.0
11+
* feature: Frameworks: Use more idiomatic ECR repository naming scheme
912

1013
1.1.3
1114
========

README.rst

Lines changed: 39 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -692,23 +692,23 @@ When training and deploying training scripts, SageMaker runs your Python script
692692
693693
SageMaker runs MXNet Estimator scripts in either Python 2.7 or Python 3.5. You can select the Python version by passing a ``py_version`` keyword arg to the MXNet Estimator constructor. Setting this to ``py2`` (the default) will cause your training script to be run on Python 2.7. Setting this to ``py3`` will cause your training script to be run on Python 3.5. This Python version applies to both the Training Job, created by fit, and the Endpoint, created by deploy.
694694
695-
Your MXNet training script will be run on version 1.0.0 (by default) or 0.12 of MXNet, built for either GPU or CPU use. The decision to use the GPU or CPU version of MXNet is made by the ``train_instance_type``, set on the MXNet constructor. If you choose a GPU instance type, your training job will be run on a GPU version of MXNet. If you choose a CPU instance type, your training job will be run on a CPU version of MXNet. Similarly, when you call deploy, specifying a GPU or CPU deploy_instance_type, will control which MXNet build your Endpoint runs.
695+
Your MXNet training script will be run on version 1.1.0 by default. (See below for how to choose a different version, and currently supported versions.) The decision to use the GPU or CPU version of MXNet is made by the ``train_instance_type``, set on the MXNet constructor. If you choose a GPU instance type, your training job will be run on a GPU version of MXNet. If you choose a CPU instance type, your training job will be run on a CPU version of MXNet. Similarly, when you call deploy, specifying a GPU or CPU deploy_instance_type, will control which MXNet build your Endpoint runs.
696696
697697
The Docker images have the following dependencies installed:
698698
699-
+-------------------------+--------------+-------------+
700-
| Dependencies | MXNet 0.12.1 | MXNet 1.0.0 |
701-
+-------------------------+--------------+-------------+
702-
| Python | 2.7 or 3.5 | 2.7 or 3.5|
703-
+-------------------------+--------------+-------------+
704-
| CUDA | 9.0 | 9.0 |
705-
+-------------------------+--------------+-------------+
706-
| numpy | 1.13.3 | 1.13.3 |
707-
+-------------------------+--------------+-------------+
699+
+-------------------------+--------------+-------------+-------------+
700+
| Dependencies | MXNet 0.12.1 | MXNet 1.0.0 | MXNet 1.1.0 |
701+
+-------------------------+--------------+-------------+-------------+
702+
| Python | 2.7 or 3.5 | 2.7 or 3.5| 2.7 or 3.5|
703+
+-------------------------+--------------+-------------+-------------+
704+
| CUDA | 9.0 | 9.0 | 9.0 |
705+
+-------------------------+--------------+-------------+-------------+
706+
| numpy | 1.13.3 | 1.13.3 | 1.13.3 |
707+
+-------------------------+--------------+-------------+-------------+
708708
709709
The Docker images extend Ubuntu 16.04.
710710
711-
You can select version of MXNet by passing a ``framework_version`` keyword arg to the MXNet Estimator constructor. Currently supported versions are ``1.0.0`` and ``0.12.1``. You can also set ``framework_version`` to ``1.0 (default)`` or ``0.12`` which will cause your training script to be run on the latest supported MXNet 1.0 or 0.12 versions respectively.
711+
You can select version of MXNet by passing a ``framework_version`` keyword arg to the MXNet Estimator constructor. Currently supported versions are listed in the above table. You can also set ``framework_version`` to only specify major and minor version, e.g ``1.1``, which will cause your training script to be run on the latest supported patch version of that minor version, which in this example would be 1.1.0.
712712
713713
TensorFlow SageMaker Estimators
714714
-------------------------------
@@ -717,7 +717,7 @@ TensorFlow SageMaker Estimators allow you to run your own TensorFlow
717717
training algorithms on SageMaker Learner, and to host your own TensorFlow
718718
models on SageMaker Hosting.
719719
720-
Supported versions of TensorFlow: ``1.4.1``, ``1.5.0``.
720+
Supported versions of TensorFlow: ``1.4.1``, ``1.5.0``, ``1.6.0``.
721721
722722
Training with TensorFlow
723723
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -752,7 +752,7 @@ Preparing the TensorFlow training script
752752
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
753753
754754
Your TensorFlow training script must be a **Python 2.7** source file. The current supported TensorFlow
755-
versions are **1.5.0 (default)** and **1.4.1**. This training script **must contain** the following functions:
755+
versions are **1.6.0 (default)**, **1.5.0**, and **1.4.1**. This training script **must contain** the following functions:
756756
757757
- ``model_fn``: defines the model that will be trained.
758758
- ``train_input_fn``: preprocess and load training data.
@@ -1443,47 +1443,35 @@ SageMaker TensorFlow Docker containers
14431443
14441444
The TensorFlow Docker images support Python 2.7 and have the following Python modules installed:
14451445
1446-
+------------------------+------------------+------------------+
1447-
| Dependencies | tensorflow 1.4.1 | tensorflow 1.5.0 |
1448-
+------------------------+------------------+------------------+
1449-
| awscli | 1.12.1 | 1.14.35 |
1450-
+------------------------+------------------+------------------+
1451-
| boto3 | 1.4.7 | 1.5.22 |
1452-
+------------------------+------------------+------------------+
1453-
| botocore | 1.5.92 | 1.8.36 |
1454-
+------------------------+------------------+------------------+
1455-
| futures | 2.2.0 | 2.2.0 |
1456-
+------------------------+------------------+------------------+
1457-
| gevent | 1.2.2 | 1.2.2 |
1458-
+------------------------+------------------+------------------+
1459-
| grpcio | 1.7.0 | 1.9.0 |
1460-
+------------------------+------------------+------------------+
1461-
| numpy | 1.13.3 | 1.14.0 |
1462-
+------------------------+------------------+------------------+
1463-
| pandas | 0.21.0 | 0.22.0 |
1464-
+------------------------+------------------+------------------+
1465-
| protobuf | 3.4.0 | 3.5.1 |
1466-
+------------------------+------------------+------------------+
1467-
| requests | 2.14.2 | 2.18.4 |
1468-
+------------------------+------------------+------------------+
1469-
| scikit-learn | 0.19.1 | 0.19.1 |
1470-
+------------------------+------------------+------------------+
1471-
| scipy | 1.0.0 | 1.0.0 |
1472-
+------------------------+------------------+------------------+
1473-
| six | 1.10.0 | 1.10.0 |
1474-
+------------------------+------------------+------------------+
1475-
| sklearn | 0.0 | 0.0 |
1476-
+------------------------+------------------+------------------+
1477-
| tensorflow | 1.4.1 | 1.5.0 |
1478-
+------------------------+------------------+------------------+
1479-
| tensorflow-serving-api | 1.4.0 | 1.5.0 |
1480-
+------------------------+------------------+------------------+
1481-
| tensorflow-tensorboard | 0.4.0 | 1.5.1 |
1482-
+------------------------+------------------+------------------+
1446+
+------------------------+------------------+------------------+------------------+
1447+
| Dependencies | tensorflow 1.4.1 | tensorflow 1.5.0 | tensorflow 1.6.0 |
1448+
+------------------------+------------------+------------------+------------------+
1449+
| boto3 | 1.4.7 | 1.5.22 | 1.6.21 |
1450+
+------------------------+------------------+------------------+------------------+
1451+
| botocore | 1.5.92 | 1.8.36 | 1.9.21 |
1452+
+------------------------+------------------+------------------+------------------+
1453+
| grpcio | 1.7.0 | 1.9.0 | 1.10.0 |
1454+
+------------------------+------------------+------------------+------------------+
1455+
| numpy | 1.13.3 | 1.14.0 | 1.14.2 |
1456+
+------------------------+------------------+------------------+------------------+
1457+
| pandas | 0.21.0 | 0.22.0 | 0.22.0 |
1458+
+------------------------+------------------+------------------+------------------+
1459+
| protobuf | 3.4.0 | 3.5.1 | 3.5.2 |
1460+
+------------------------+------------------+------------------+------------------+
1461+
| scikit-learn | 0.19.1 | 0.19.1 | 0.19.1 |
1462+
+------------------------+------------------+------------------+------------------+
1463+
| scipy | 1.0.0 | 1.0.0 | 1.0.1 |
1464+
+------------------------+------------------+------------------+------------------+
1465+
| sklearn | 0.0 | 0.0 | 0.0 |
1466+
+------------------------+------------------+------------------+------------------+
1467+
| tensorflow | 1.4.1 | 1.5.0 | 1.6.0 |
1468+
+------------------------+------------------+------------------+------------------+
1469+
| tensorflow-serving-api | 1.4.0 | 1.5.0 | 1.5.0 |
1470+
+------------------------+------------------+------------------+------------------+
14831471
14841472
The Docker images extend Ubuntu 16.04.
14851473
1486-
You can select version of TensorFlow by passing a ``framework_version`` keyword arg to the TensorFlow Estimator constructor. Currently supported versions are ``1.5.0`` and ``1.4.1``. You can also set ``framework_version`` to ``1.5 (default)`` or ``1.4`` which will cause your training script to be run on the latest supported TensorFlow 1.5 or 1.4 versions respectively.
1474+
You can select version of TensorFlow by passing a ``framework_version`` keyword arg to the TensorFlow Estimator constructor. Currently supported versions are listed in the table above. You can also set ``framework_version`` to only specify major and minor version, e.g ``1.6``, which will cause your training script to be run on the latest supported patch version of that minor version, which in this example would be 1.6.0.
14871475
14881476
AWS SageMaker Estimators
14891477
------------------------

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def read(fname):
1111

1212

1313
setup(name="sagemaker",
14-
version="1.1.3",
14+
version="1.2.0",
1515
description="Open source library for training and deploying models on Amazon SageMaker.",
1616
packages=find_packages('src'),
1717
package_dir={'': 'src'},

src/sagemaker/mxnet/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
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-
MXNET_VERSION = '1.0'
13+
MXNET_VERSION = '1.1'

src/sagemaker/tensorflow/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
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-
TF_VERSION = '1.5'
13+
TF_VERSION = '1.6'

tests/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ def sagemaker_session(sagemaker_client_config, sagemaker_runtime_config, boto_co
5656
sagemaker_runtime_client=runtime_client)
5757

5858

59-
@pytest.fixture(scope='module', params=["1.4", "1.4.1", "1.5", "1.5.0"])
59+
@pytest.fixture(scope='module', params=['1.4', '1.4.1', '1.5', '1.5.0', '1.6', '1.6.0'])
6060
def tf_version(request):
6161
return request.param
6262

6363

64-
@pytest.fixture(scope='module', params=["0.12", "0.12.1", "1.0", "1.0.0"])
64+
@pytest.fixture(scope='module', params=['0.12', '0.12.1', '1.0', '1.0.0', '1.1', '1.1.0'])
6565
def mxnet_version(request):
6666
return request.param
6767

6868

69-
@pytest.fixture(scope='module', params=["1.4.1", "1.5.0"])
69+
@pytest.fixture(scope='module', params=['1.4.1', '1.5.0', '1.6.0'])
7070
def tf_full_version(request):
7171
return request.param
7272

7373

74-
@pytest.fixture(scope='module', params=["0.12.1", "1.0.0"])
74+
@pytest.fixture(scope='module', params=['0.12.1', '1.0.0', '1.1.0'])
7575
def mxnet_full_version(request):
7676
return request.param

tests/integ/test_mxnet_train.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,28 @@ def test_attach_deploy(mxnet_training_job, sagemaker_session):
5252
predictor.predict(data)
5353

5454

55-
def test_async_fit(sagemaker_session, mxnet_full_version):
55+
def test_deploy_model(mxnet_training_job, sagemaker_session):
56+
endpoint_name = 'test-mxnet-deploy-model-{}'.format(sagemaker_timestamp())
57+
58+
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session, minutes=20):
59+
desc = sagemaker_session.sagemaker_client.describe_training_job(TrainingJobName=mxnet_training_job)
60+
model_data = desc['ModelArtifacts']['S3ModelArtifacts']
61+
script_path = os.path.join(DATA_DIR, 'mxnet_mnist', 'mnist.py')
62+
model = MXNetModel(model_data, 'SageMakerRole', entry_point=script_path, sagemaker_session=sagemaker_session)
63+
predictor = model.deploy(1, 'ml.m4.xlarge', endpoint_name=endpoint_name)
5664

57-
training_job_name = ""
65+
data = numpy.zeros(shape=(1, 1, 28, 28))
66+
predictor.predict(data)
67+
68+
69+
def test_async_fit(sagemaker_session):
5870
endpoint_name = 'test-mxnet-attach-deploy-{}'.format(sagemaker_timestamp())
5971

6072
with timeout(minutes=5):
6173
script_path = os.path.join(DATA_DIR, 'mxnet_mnist', 'mnist.py')
6274
data_path = os.path.join(DATA_DIR, 'mxnet_mnist')
6375

64-
mx = MXNet(entry_point=script_path, role='SageMakerRole', framework_version=mxnet_full_version,
76+
mx = MXNet(entry_point=script_path, role='SageMakerRole',
6577
train_instance_count=1, train_instance_type='ml.c4.xlarge',
6678
sagemaker_session=sagemaker_session)
6779

@@ -84,20 +96,6 @@ def test_async_fit(sagemaker_session, mxnet_full_version):
8496
predictor.predict(data)
8597

8698

87-
def test_deploy_model(mxnet_training_job, sagemaker_session):
88-
endpoint_name = 'test-mxnet-deploy-model-{}'.format(sagemaker_timestamp())
89-
90-
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session, minutes=20):
91-
desc = sagemaker_session.sagemaker_client.describe_training_job(TrainingJobName=mxnet_training_job)
92-
model_data = desc['ModelArtifacts']['S3ModelArtifacts']
93-
script_path = os.path.join(DATA_DIR, 'mxnet_mnist', 'mnist.py')
94-
model = MXNetModel(model_data, 'SageMakerRole', entry_point=script_path, sagemaker_session=sagemaker_session)
95-
predictor = model.deploy(1, 'ml.m4.xlarge', endpoint_name=endpoint_name)
96-
97-
data = numpy.zeros(shape=(1, 1, 28, 28))
98-
predictor.predict(data)
99-
100-
10199
def test_failed_training_job(sagemaker_session, mxnet_full_version):
102100
with timeout(minutes=15):
103101
script_path = os.path.join(DATA_DIR, 'mxnet_mnist', 'failure_script.py')

tests/integ/test_tf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,12 @@ def test_tf(sagemaker_session, tf_full_version):
5555
assert dict_result == list_result
5656

5757

58-
def test_tf_async(sagemaker_session, tf_full_version):
59-
training_job_name = ""
58+
def test_tf_async(sagemaker_session):
6059
with timeout(minutes=5):
6160
script_path = os.path.join(DATA_DIR, 'iris', 'iris-dnn-classifier.py')
6261

6362
estimator = TensorFlow(entry_point=script_path,
6463
role='SageMakerRole',
65-
framework_version=tf_full_version,
6664
training_steps=1,
6765
evaluation_steps=1,
6866
hyperparameters={'input_tensor_name': 'inputs'},

0 commit comments

Comments
 (0)