Skip to content

Commit

Permalink
doc: update documentation with v2.0.0.rc1 changes and bump version (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenyu committed Jul 9, 2020
1 parent a0f1a78 commit 8ec7f05
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 12 deletions.
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# Changelog

## v2.0.0.rc1 (2020-07-08)

### Breaking Changes

* Move StreamDeserializer to sagemaker.deserializers
* Move StringDeserializer to sagemaker.deserializers
* rename record_deserializer to RecordDeserializer
* remove "train_" where redundant in parameter/variable names
* Add BytesDeserializer
* rename image to image_uri
* rename image_name to image_uri
* create new inference resources during model.deploy() and model.transformer()
* rename session parameter to sagemaker_session in S3 utility classes
* rename distributions to distribution in TF/MXNet estimators
* deprecate update_endpoint arg in deploy()
* create new inference resources during estimator.deploy() or estimator.transformer()
* deprecate delete_endpoint() for estimators and HyperparameterTuner
* refactor Predictor attribute endpoint to endpoint_name
* make instance_type optional for Airflow model configs
* refactor name of RealTimePredictor to Predictor
* remove check for Python 2 string in sagemaker.predictor._is_sequence_like()
* deprecate sagemaker.utils.to_str()
* drop Python 2 support

### Features

* add BaseSerializer and BaseDeserializer
* add Predictor.update_endpoint()

### Bug Fixes and Other Changes

* handle "train_*" renames in v2 migration tool
* handle image_uri rename for Session methods in v2 migration tool
* Update BytesDeserializer accept header
* handle image_uri rename for estimators and models in v2 migration tool
* handle image_uri rename in Airflow model config functions in v2 migration tool
* update migration tool for S3 utility functions
* set _current_job_name and base_tuning_job_name in HyperparameterTuner.attach()
* infer base name from job name in estimator.attach()
* ensure generated names are < 63 characters when deploying compiled models
* add TF migration documentation to error message

### Documentation Changes

* update documentation with v2.0.0.rc1 changes
* remove 'train_*' prefix from estimator parameters
* update documentation for image_name/image --> image_uri

### Testing and Release Infrastructure

* refactor matching logic in v2 migration tool
* add cli modifier for RealTimePredictor and derived classes
* change coverage settings to reduce intermittent errors
* clean up pickle.load logic in integ tests
* use fixture for Python version in framework integ tests
* remove assumption of Python 2 unit test runs

## v1.68.0 (2020-07-07)

### Features
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0.rc0
2.0.0.rc1
118 changes: 107 additions & 11 deletions doc/v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To install the latest release candidate:

.. code:: bash
pip install git+git@github.com:aws/sagemaker-python-sdk.git@v2.0.0.rc0
pip install git+git@github.com:aws/sagemaker-python-sdk.git@v2.0.0.rc1
To install the latest version of v2:

Expand All @@ -38,6 +38,38 @@ Changes
This section is for major changes that may require updates to your SageMaker Python SDK code.
You can also see what changes have been made in the `CHANGELOG <https://github.com/aws/sagemaker-python-sdk/blob/zwei/CHANGELOG.md>`_.

Deprecations
============

Python 2 Support
----------------

This library is no longer supported for Python 2.
Please upgrade to Python 3 if you haven't already.

Deprecate Legacy TensorFlow
---------------------------

TensorFlow versions 1.4-1.10 and some variations of versions 1.11-1.12
(see `What Constitutes "Legacy TensorFlow Support" <frameworks/tensorflow/upgrade_from_legacy.html#what-constitutes-legacy-tensorflow-support>`_)
are no longer natively supported by the SageMaker Python SDK.

To use those versions of TensorFlow, you must specify the Docker image URI explicitly,
and configure settings via hyperparameters or environment variables rather than using SDK parameters.
For more information, see `Upgrade from Legacy TensorFlow Support <frameworks/tensorflow/upgrade_from_legacy.html>`_.

``delete_endpoint()`` for Estimators and ``HyperparameterTuner``
----------------------------------------------------------------

The ``delete_endpoint()`` method for estimators and ``HyperparameterTuner`` has been deprecated.
Please use :func:`sagemaker.predictor.Predictor.delete_endpoint` instead.

``update_endpoint`` in ``deploy()``
-----------------------------------

The ``update_endpoint`` argument in ``deploy()`` methods for estimators and models has been deprecated.
Please use :func:`sagemaker.predictor.Predictor.update_endpoint` instead.

Require ``framework_version`` and ``py_version`` for Frameworks
===============================================================

Expand Down Expand Up @@ -69,19 +101,51 @@ For example:
py_version="py3", # now required
)
Deprecate Legacy TensorFlow
===========================
Parameter and Class Name Changes
================================

TensorFlow versions 1.4-1.10 and some variations of versions 1.11-1.12
(see `What Constitutes "Legacy TensorFlow Support" <frameworks/tensorflow/upgrade_from_legacy.html#what-constitutes-legacy-tensorflow-support>`_)
are no longer natively supported by the SageMaker Python SDK.
Estimators
----------

To use those versions of TensorFlow, you must specify the Docker image URI explicitly,
and configure settings via hyperparameters or environment variables rather than using SDK parameters.
For more information, see `Upgrade from Legacy TensorFlow Support <frameworks/tensorflow/upgrade_from_legacy.html>`_.
Renamed Estimator Parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The following estimator parameters have been renamed:

+------------------------------+------------------------+
| v1.x | v2.0 and later |
+==============================+========================+
| ``train_instance_count`` | ``instance_count`` |
+------------------------------+------------------------+
| ``train_instance_type`` | ``instance_type`` |
+------------------------------+------------------------+
| ``train_max_run`` | ``max_run`` |
+------------------------------+------------------------+
| ``train_use_spot_instances`` | ``use_spot_instances`` |
+------------------------------+------------------------+
| ``train_max_run_wait`` | ``max_run_wait`` |
+------------------------------+------------------------+
| ``train_volume_size`` | ``volume_size`` |
+------------------------------+------------------------+
| ``train_volume_kms_key`` | ``volume_kms_key`` |
+------------------------------+------------------------+

``distributions``
~~~~~~~~~~~~~~~~~

For TensorFlow and MXNet estimators, ``distributions`` has been renamed to ``distribution``.

Parameter Changes for ``sagemaker.model.Model``
===============================================
Specify Custom Training Images
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``image_name`` parameter has been renamed to ``image_uri`` for specifying a custom Docker image URI to use with training.


Models
------

``sagemaker.model.Model`` Parameter Order
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The parameter order for :class:`sagemaker.model.Model` changed: instead of ``model_data`` being first, ``image_uri`` (formerly ``image``) is first.
As a result, ``model_data`` has been made into an optional parameter.
Expand All @@ -96,6 +160,29 @@ If you are using the :class:`sagemaker.model.Model` class, your code should be c
# v2.0 and later
Model("my-image:latest", model_data="s3://bucket/path/model.tar.gz")
Specify Custom Serving Image
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``image`` parameter has been renamed to ``image_uri`` for specifying a custom Docker image URI to use with inference.

Predictors
----------

``sagemaker.predictor.RealTimePredictor`` has been renamed to :class:`sagemaker.predictor.Predictor`.

In addition, for :class:`sagemaker.predictor.Predictor`, :class:`sagemaker.sparkml.model.SparkMLPredictor`,
and predictors for Amazon algorithm (e.g. Factorization Machines, Linear Learner, etc.),
the ``endpoint`` attribute has been renamed to ``endpoint_name``.

Airflow
-------

For :func:`sagemaker.workflow.airflow.model_config` and :func:`sagemaker.workflow.airflow.model_config_from_estimator`,
``instance_type`` is no longer the first positional argument and is now an optional keyword argument.

For :func:`sagemaker.workflow.airflow.model_config`, :func:`sagemaker.workflow.airflow.model_config_from_estimator`, and
:func:`sagemaker.workflow.airflow.transform_config_from_estimator`, the ``image`` argument has been renamed to ``image_uri``.

Dependency Changes
==================

Expand Down Expand Up @@ -170,3 +257,12 @@ If you are using the ``sagemaker.tensorflow.serving.Model`` class, the tool does
-------------------------

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_uri`` (formerly ``image``).

``update_endpoint`` and ``delete_endpoint``
-------------------------------------------

The tool does not take care of removing the ``update_endpoint`` argument from a ``deploy`` call.
If you are using that argument, please modify your code to use :func:`sagemaker.predictor.Predictor.update_endpoint` instead.

The tool also does not handle ``delete_endpoint`` calls on estimators or ``HyperparameterTuner``.
If you are using that method, please modify your code to use :func:`sagemaker.predictor.Predictor.delete_endpoint` instead.

0 comments on commit 8ec7f05

Please sign in to comment.