|
1 | | -########################################################## |
2 | | -Use Version 2.0 of the SageMaker Python SDK (experimental) |
3 | | -########################################################## |
4 | | - |
5 | | -Development on v2.0.0 of the SageMaker Python SDK is underway. |
6 | | -For more info on our plans, see https://github.com/aws/sagemaker-python-sdk/issues/1459. |
| 1 | +########################################### |
| 2 | +Use Version 2.x of the SageMaker Python SDK |
| 3 | +########################################### |
7 | 4 |
|
8 | 5 | .. contents:: |
9 | 6 | :local: |
| 7 | + :depth: 2 |
10 | 8 |
|
11 | 9 | ************ |
12 | 10 | Installation |
13 | 11 | ************ |
14 | 12 |
|
15 | | -.. warning:: |
16 | | - Version 2.0.0 is currently experimental, so proceed with caution. If you do run into issues or have any other feedback, |
17 | | - please let us know by `opening an issue <https://github.com/aws/sagemaker-python-sdk/issues/new/choose>`_ |
18 | | - or `commenting on our planning issue <https://github.com/aws/sagemaker-python-sdk/issues/1459>`_. |
19 | | - |
20 | | -To install the latest release candidate: |
21 | | - |
22 | | -.. code:: bash |
23 | | -
|
24 | | - pip install git+git://github.com/aws/sagemaker-python-sdk.git@v2.0.0.rc1 |
25 | | -
|
26 | | -To install the latest version of v2: |
| 13 | +To install the latest version: |
27 | 14 |
|
28 | 15 | .. code:: bash |
29 | 16 |
|
30 | | - pip install git+git://github.com/aws/sagemaker-python-sdk.git@zwei |
| 17 | + pip install --upgrade sagemaker |
31 | 18 |
|
32 | 19 | If you are executing this pip install command in a notebook, make sure to restart your kernel. |
33 | 20 |
|
34 | | -******* |
35 | | -Changes |
36 | | -******* |
| 21 | +**************** |
| 22 | +Breaking Changes |
| 23 | +**************** |
37 | 24 |
|
38 | 25 | 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>`_. |
| 26 | +For the full list of changes, see the `CHANGELOG <https://github.com/aws/sagemaker-python-sdk/blob/master/CHANGELOG.md>`_. |
40 | 27 |
|
41 | 28 | Deprecations |
42 | 29 | ============ |
@@ -94,6 +81,13 @@ Please instantiate the objects instead. |
94 | 81 | The ``update_endpoint`` argument in ``deploy()`` methods for estimators and models has been deprecated. |
95 | 82 | Please use :func:`sagemaker.predictor.Predictor.update_endpoint` instead. |
96 | 83 |
|
| 84 | +``serializer`` and ``deserializer`` in ``create_model()`` |
| 85 | +--------------------------------------------------------- |
| 86 | + |
| 87 | +The ``serializer`` and ``deserializer`` arguments in |
| 88 | +:func:`sagemaker.estimator.Estimator.create_model` have been deprecated. Please |
| 89 | +specify serializers and deserializers in ``deploy()`` methods instead. |
| 90 | + |
97 | 91 | ``content_type`` and ``accept`` in the Predictor Constructor |
98 | 92 | ------------------------------------------------------------ |
99 | 93 |
|
@@ -127,8 +121,46 @@ write MIME types as a string, |
127 | 121 | | ``CONTENT_TYPE_NPY`` | ``"application/x-npy"`` | |
128 | 122 | +-------------------------------+--------------------------------+ |
129 | 123 |
|
| 124 | +Image URI Functions (e.g. ``get_image_uri``) |
| 125 | +-------------------------------------------- |
| 126 | + |
| 127 | +The following functions have been deprecated in favor of :func:`sagemaker.image_uris.retrieve`: |
| 128 | + |
| 129 | +- ``sagemaker.amazon_estimator.get_image_uri()`` |
| 130 | +- ``sagemaker.fw_utils.create_image_uri()`` |
| 131 | +- ``sagemaker.fw_registry.registry()`` |
| 132 | +- ``sagemaker.utils.get_ecr_image_uri_prefix()`` |
| 133 | + |
| 134 | +For more information about usage, see :func:`sagemaker.image_uris.retrieve`. |
| 135 | + |
| 136 | +SageMaker Python SDK CLI |
| 137 | +------------------------ |
| 138 | + |
| 139 | +The SageMaker Python SDK CLI has been deprecated. |
| 140 | +(This is different from the AWS CLI.) |
| 141 | + |
| 142 | +``enable_cloudwatch_metrics`` for Estimators and Models |
| 143 | +------------------------------------------------------- |
| 144 | + |
| 145 | +The parameter ``enable_cloudwatch_metrics`` has been deprecated. |
| 146 | +CloudWatch metrics are already emitted for all Training Jobs, etc. |
| 147 | + |
| 148 | +``sagemaker.fw_utils.parse_s3_url`` |
| 149 | +----------------------------------- |
| 150 | + |
| 151 | +The ``sagemaker.fw_utils.parse_s3_url`` function has been deprecated. |
| 152 | +Please use :func:`sagemaker.s3.parse_s3_url` instead. |
| 153 | + |
| 154 | +``sagemaker.session.ModelContainer`` |
| 155 | +------------------------------------ |
| 156 | + |
| 157 | +The class ``sagemaker.session.ModelContainer`` has been deprecated, as it is not needed for creating inference pipelines. |
| 158 | + |
| 159 | +Changes in Default Behavior |
| 160 | +=========================== |
| 161 | + |
130 | 162 | Require ``framework_version`` and ``py_version`` for Frameworks |
131 | | -=============================================================== |
| 163 | +--------------------------------------------------------------- |
132 | 164 |
|
133 | 165 | Framework estimator and model classes now require ``framework_version`` and ``py_version`` instead of supplying defaults, |
134 | 166 | unless an image URI is explicitly supplied. |
@@ -158,6 +190,25 @@ For example: |
158 | 190 | py_version="py3", # now required |
159 | 191 | ) |
160 | 192 |
|
| 193 | +Log Display Behavior with ``attach()`` |
| 194 | +-------------------------------------- |
| 195 | + |
| 196 | +Logs are no longer printed when using ``attach()`` with an estimator. |
| 197 | +To view logs after attaching a training job to an estimator, use :func:`sagemaker.estimator.EstimatorBase.logs`. |
| 198 | + |
| 199 | +``HyperparameterTuner.fit()`` and ``Transformer.transform()`` |
| 200 | +------------------------------------------------------------- |
| 201 | + |
| 202 | +:func:`sagemaker.tuner.HyperparameterTuner.fit` and :func:`sagemaker.transformer.Transformer.transform` now wait |
| 203 | +until the completion of the Hyperparameter Tuning Job or Batch Transform Job, respectively. |
| 204 | +To make the function non-blocking, use ``wait=False``. |
| 205 | + |
| 206 | +XGBoost Predictor |
| 207 | +----------------- |
| 208 | + |
| 209 | +The default serializer of ``sagemaker.xgboost.model.XGBoostPredictor`` has been changed from ``NumpySerializer`` to ``LibSVMSerializer``. |
| 210 | + |
| 211 | + |
161 | 212 | Parameter and Class Name Changes |
162 | 213 | ================================ |
163 | 214 |
|
@@ -218,6 +269,8 @@ The follow serializer/deserializer classes have been renamed and/or moved: |
218 | 269 | | ``sagemaker.predictor._JsonDeserializer`` | ``sagemaker.deserializers.JSONDeserializer`` | |
219 | 270 | +--------------------------------------------------------+-------------------------------------------------------+ |
220 | 271 |
|
| 272 | +``sagemaker.serializers.LibSVMSerializer`` has been added in v2.0. |
| 273 | + |
221 | 274 | ``distributions`` |
222 | 275 | ~~~~~~~~~~~~~~~~~ |
223 | 276 |
|
@@ -281,6 +334,19 @@ TensorFlow Serving Predictor |
281 | 334 | (For the previous implementation of that class, see `Deprecate Legacy TensorFlow <#deprecate-legacy-tensorflow>`_). |
282 | 335 |
|
283 | 336 |
|
| 337 | +Inputs |
| 338 | +------ |
| 339 | + |
| 340 | +``s3_input`` |
| 341 | +~~~~~~~~~~~~ |
| 342 | + |
| 343 | +``sagemaker.session.s3_input`` has been renamed to :class:`sagemaker.inputs.TrainingInput`. |
| 344 | + |
| 345 | +``ShuffleConfig`` |
| 346 | +~~~~~~~~~~~~~~~~~ |
| 347 | + |
| 348 | +``sagemaker.session.ShuffleConfig`` has been renamed to :class:`sagemaker.inputs.ShuffleConfig`. |
| 349 | + |
284 | 350 | Airflow |
285 | 351 | ------- |
286 | 352 |
|
|
0 commit comments