Skip to content

Commit d259b5c

Browse files
authored
doc: update documentation with v2.0.0.rc0 changes (#1578)
1 parent a83bed5 commit d259b5c

File tree

2 files changed

+112
-1
lines changed

2 files changed

+112
-1
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## v2.0.0.rc0
4+
5+
### Breaking Changes
6+
7+
* remove estimator parameters for TF legacy mode
8+
* remove legacy `TensorFlowModel` and `TensorFlowPredictor` classes
9+
* force image URI to be passed for legacy TF images
10+
* rename `sagemaker.tensorflow.serving` to `sagemaker.tensorflow.model`
11+
* require `framework_version` and `py_version` for framework estimator and model classes
12+
* change `Model` parameter order to make `model_data` optional
13+
14+
### Bug Fixes and Other Changes
15+
16+
* add v2 migration tool
17+
18+
### Documentation Changes
19+
20+
* update TF documentation to reflect breaking changes and how to upgrade
21+
* start v2 usage and migration documentation
22+
23+
### Testing and Release Infrastructure
24+
25+
* remove scipy from dependencies
26+
* remove TF from optional dependencies
27+
328
## v1.60.2 (2020-05-29)
429

530
### Bug Fixes and Other Changes

doc/v2.rst

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,88 @@ If you are executing this pip install command in a notebook, make sure to restar
3535
Changes
3636
*******
3737

38-
To see what changes have been made, see the `CHANGELOG <https://github.com/aws/sagemaker-python-sdk/blob/zwei/CHANGELOG.md>`_.
38+
This section is for major changes that may require updates to your SageMaker Python SDK code.
39+
You can also see what changes have been made in the `CHANGELOG <https://github.com/aws/sagemaker-python-sdk/blob/zwei/CHANGELOG.md>`_.
40+
41+
Require ``framework_version`` and ``py_version`` for Frameworks
42+
===============================================================
43+
44+
Framework estimator and model classes now require ``framework_version`` and ``py_version`` instead of supplying defaults,
45+
unless an image URI is explicitly supplied.
46+
47+
For example:
48+
49+
.. code:: python
50+
51+
from sagemaker.tensorflow import TensorFlow
52+
53+
TensorFlow(
54+
entry_point="script.py",
55+
framework_version="2.2.0", # now required
56+
py_version="py37", # now required
57+
role="my-role",
58+
train_instance_type="ml.m5.xlarge",
59+
train_instance_count=1,
60+
)
61+
62+
from sagemaker.mxnet import MXNetModel
63+
64+
MXNetModel(
65+
model_data="s3://bucket/model.tar.gz",
66+
role="my-role",
67+
entry_point="inference.py",
68+
framework_version="1.6.0", # now required
69+
py_version="py3", # now required
70+
)
71+
72+
Deprecate Legacy TensorFlow
73+
===========================
74+
75+
TensorFlow versions 1.4-1.10 and some variations of versions 1.11-1.12
76+
(see `What Constitutes "Legacy TensorFlow Support" <frameworks/tensorflow/upgrade_from_legacy.html#what-constitutes-legacy-tensorflow-support>`_)
77+
are no longer natively supported by the SageMaker Python SDK.
78+
79+
To use those versions of TensorFlow, you must specify the Docker image URI explicitly,
80+
and configure settings via hyperparameters or environment variables rather than using SDK parameters.
81+
For more information, see `Upgrade from Legacy TensorFlow Support <frameworks/tensorflow/upgrade_from_legacy.html>`_.
82+
83+
Parameter Changes for ``sagemaker.model.Model``
84+
===============================================
85+
86+
The parameter order for :class:`sagemaker.model.Model` changed: instead of ``model_data`` being first, ``image`` now is first.
87+
As a result, ``model_data`` has now been made into an optional parameter.
88+
89+
If you are using the :class:`sagemaker.model.Model` class, your code should be changed as follows:
90+
91+
.. code:: python
92+
93+
# v1.x
94+
Model("s3://bucket/path/model.tar.gz", "my-image:latest")
95+
96+
# v2.0 and later
97+
Model("my-image:latest", model_data="s3://bucket/path/model.tar.gz")
98+
99+
Dependency Changes
100+
==================
101+
102+
SciPy
103+
-----
104+
105+
SciPy is no longer a required dependency of the SageMaker Python SDK.
106+
107+
If you use :func:`sagemaker.amazon.common.write_spmatrix_to_sparse_tensor` and
108+
don't already install SciPy in your environment, you can use our ``scipy`` installation target:
109+
110+
.. code:: bash
111+
112+
pip install sagemaker[scipy]
113+
114+
TensorFlow
115+
----------
116+
117+
The ``tensorflow`` installation target has been removed, as it is no longer needed for any SageMaker Python SDK functionality.
118+
119+
If you want to install TensorFlow, see `the TensorFlow documentation <https://www.tensorflow.org/install>`_.
39120

40121
*******************************
41122
Automatically Upgrade Your Code
@@ -84,3 +165,8 @@ TensorFlow Serving
84165
------------------
85166

86167
If you are using the ``sagemaker.tensorflow.serving.Model`` class, the tool does not take care of adding a framework version or changing it to ``sagemaker.tensorflow.TensorFlowModel``.
168+
169+
``sagemaker.model.Model``
170+
-------------------------
171+
172+
If you are using the :class:`sagemaker.model.Model` class, the tool does not take care of switching the order between ``model_data`` and ``image``.

0 commit comments

Comments
 (0)