Skip to content

Sklearn docs 2018 11 12 #545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@ Table of Contents
4. `TensorFlow SageMaker Estimators <#tensorflow-sagemaker-estimators>`__
5. `Chainer SageMaker Estimators <#chainer-sagemaker-estimators>`__
6. `PyTorch SageMaker Estimators <#pytorch-sagemaker-estimators>`__
7. `SageMaker Reinforcement Learning Estimators <#sagemaker-reinforcement-learning-estimators>`__
8. `SageMaker SparkML Serving <#sagemaker-sparkml-serving>`__
9. `AWS SageMaker Estimators <#aws-sagemaker-estimators>`__
10. `Using SageMaker AlgorithmEstimators <#using-sagemaker-algorithmestimators>`__
11. `Consuming SageMaker Model Packages <#consuming-sagemaker-model-packages>`__
12. `BYO Docker Containers with SageMaker Estimators <#byo-docker-containers-with-sagemaker-estimators>`__
13. `SageMaker Automatic Model Tuning <#sagemaker-automatic-model-tuning>`__
14. `SageMaker Batch Transform <#sagemaker-batch-transform>`__
15. `Secure Training and Inference with VPC <#secure-training-and-inference-with-vpc>`__
16. `BYO Model <#byo-model>`__
17. `Inference Pipelines <#inference-pipelines>`__
18. `SageMaker Workflow <#sagemaker-workflow>`__
7. `Scikit-learn SageMaker Estimators <#scikit-learn-sagemaker-estimators>`__
8. `SageMaker Reinforcement Learning Estimators <#sagemaker-reinforcement-learning-estimators>`__
9. `SageMaker SparkML Serving <#sagemaker-sparkml-serving>`__
10. `AWS SageMaker Estimators <#aws-sagemaker-estimators>`__
11. `Using SageMaker AlgorithmEstimators <#using-sagemaker-algorithmestimators>`__
12. `Consuming SageMaker Model Packages <#consuming-sagemaker-model-packages>`__
13. `BYO Docker Containers with SageMaker Estimators <#byo-docker-containers-with-sagemaker-estimators>`__
14. `SageMaker Automatic Model Tuning <#sagemaker-automatic-model-tuning>`__
15. `SageMaker Batch Transform <#sagemaker-batch-transform>`__
16. `Secure Training and Inference with VPC <#secure-training-and-inference-with-vpc>`__
17. `BYO Model <#byo-model>`__
18. `Inference Pipelines <#inference-pipelines>`__
19. `SageMaker Workflow <#sagemaker-workflow>`__


Installing the SageMaker Python SDK
Expand Down Expand Up @@ -144,6 +145,7 @@ The following sections of this document explain how to use the different estimat
* `TensorFlow SageMaker Estimators and Models <#tensorflow-sagemaker-estimators>`__
* `Chainer SageMaker Estimators and Models <#chainer-sagemaker-estimators>`__
* `PyTorch SageMaker Estimators <#pytorch-sagemaker-estimators>`__
* `Scikit-learn SageMaker Estimators and Models <#scikit-learn-sagemaker-estimators>`__
* `SageMaker Reinforcement Learning Estimators <#sagemaker-reinforcement-learning-estimators>`__
* `AWS SageMaker Estimators and Models <#aws-sagemaker-estimators>`__
* `Custom SageMaker Estimators and Models <#byo-docker-containers-with-sagemaker-estimators>`__
Expand Down Expand Up @@ -418,6 +420,22 @@ For more information about PyTorch SageMaker ``Estimators``, see `PyTorch SageMa
.. _PyTorch SageMaker Estimators and Models: src/sagemaker/pytorch/README.rst


Scikit-learn SageMaker Estimators
---------------------------------

With Scikit-learn SageMaker ``Estimators``, you can train and host Scikit-learn models on Amazon SageMaker.

Supported versions of Scikit-learn: ``0.20.0``.

We recommend that you use the latest supported version, because that's where we focus most of our development efforts.

For more information about Scikit-learn, see https://scikit-learn.org/stable/

For more information about Scikit-learn SageMaker ``Estimators``, see `Scikit-learn SageMaker Estimators and Models`_.

.. _Scikit-learn SageMaker Estimators and Models: src/sagemaker/sklearn/README.rst


SageMaker Reinforcement Learning Estimators
-------------------------------------------

Expand Down
15 changes: 7 additions & 8 deletions src/sagemaker/sklearn/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Table of Contents
5. `SageMaker Scikit-learn Model Server <#sagemaker-scikit-learn-model-server>`__
6. `Working with Existing Model Data and Training Jobs <#working-with-existing-model-data-and-training-jobs>`__
7. `Scikit-learn Training Examples <#scikit-learn-training-examples>`__
8. `SageMaker PyTorch Docker Containers <#sagemaker-pytorch-docker-containers>`__
8. `SageMaker Scikit-learn Docker Containers <#sagemaker-scikit-learn-docker-containers>`__


Training with Scikit-learn
Expand Down Expand Up @@ -62,7 +62,6 @@ can access useful properties about the training environment through various envi

* ``SM_MODEL_DIR``: A string representing the path to the directory to write model artifacts to.
These artifacts are uploaded to S3 for model hosting.
* ``SM_NUM_GPUS``: An integer representing the number of GPUs available to the host.
* ``SM_OUTPUT_DATA_DIR``: A string representing the filesystem path to write output artifacts to. Output artifacts may
include checkpoints, graphs, and other files to save, not including model artifacts. These artifacts are compressed
and uploaded to S3 to the same S3 prefix as the model artifacts.
Expand Down Expand Up @@ -109,7 +108,7 @@ inadvertently run your training code at the wrong point in execution.
For more on training environment variables, please visit https://github.com/aws/sagemaker-containers.

Running a Scikit-learn training script in SageMaker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You run Scikit-learn training scripts on SageMaker by creating ``SKLearn`` Estimators.
SageMaker training of your script is invoked when you call ``fit`` on a ``SKLearn`` Estimator.
Expand Down Expand Up @@ -188,7 +187,7 @@ The following are optional arguments. When you create a ``SKLearn`` object, you
serving. If specified, the estimator will use this image for training and
hosting, instead of selecting the appropriate SageMaker official image based on
framework_version and py_version. Refer to: `SageMaker Scikit-learn Docker Containers
<#sagemaker-sklearn-docker-containers>`_ for details on what the Official images support
<#sagemaker-scikit-learn-docker-containers>`_ for details on what the official images support
and where to find the source code to build your custom image.


Expand Down Expand Up @@ -292,7 +291,7 @@ You can access the name of the Endpoint by the ``name`` property on the returned


SageMaker Scikit-learn Model Server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Scikit-learn Endpoint you create with ``deploy`` runs a SageMaker Scikit-learn model server.
The model server loads the model that was saved by your training script and performs inference on the model in response
Expand Down Expand Up @@ -605,7 +604,7 @@ https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-pytho
These are also available in SageMaker Notebook Instance hosted Jupyter notebooks under the "sample notebooks" folder.


SageMaker Scikit-learn Docker containers
SageMaker Scikit-learn Docker Containers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When training and deploying training scripts, SageMaker runs your Python script in a Docker container with several
Expand All @@ -629,7 +628,7 @@ The Scikit-learn Docker images have the following dependencies installed:
| sagemaker-containers | 2.2.4 |
+-----------------------------+-------------+
| numpy | 1.15.2 |
+-------------------------------------------+
+-----------------------------+-------------+
| pandas | 0.23.4 |
+-----------------------------+-------------+
| Pillow | 3.1.2 |
Expand All @@ -649,4 +648,4 @@ version.
Alternatively, you can build your own image by following the instructions in the SageMaker Scikit-learn containers
repository, and passing ``image_name`` to the Scikit-learn Estimator constructor.
sagemaker-containers
You can visit the SageMaker Scikit-learn containers repository here: https://github.com/aws/sagemaker-sklearn-containers/
You can visit the SageMaker Scikit-learn containers repository here: https://github.com/aws/sagemaker-scikit-learn-container/