From c5c35f39e169cd3c3f787c6e2e5aa00b5cd78980 Mon Sep 17 00:00:00 2001 From: Eric Kim Date: Tue, 11 Dec 2018 15:34:58 -0500 Subject: [PATCH 1/5] Fixed Scikitlearn documentation --- README.rst | 42 +++++++++++++++++++++++--------- src/sagemaker/sklearn/README.rst | 13 +++++----- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/README.rst b/README.rst index d6b2504c3c..c97c063506 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -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 SageMaaker Estimators <##scikit-learan-sagemaker-estimaators>`__ * `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>`__ @@ -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 ------------------------------------------- diff --git a/src/sagemaker/sklearn/README.rst b/src/sagemaker/sklearn/README.rst index ada965aab5..5464c9bfe7 100644 --- a/src/sagemaker/sklearn/README.rst +++ b/src/sagemaker/sklearn/README.rst @@ -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 @@ -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. @@ -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. @@ -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-sklearn-docker-containers>`_ for details on what the official images support and where to find the source code to build your custom image. @@ -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 @@ -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 | @@ -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/ From b9dcbf39f41d7c1bfe888238136a4b77504730d8 Mon Sep 17 00:00:00 2001 From: Eric Kim Date: Tue, 11 Dec 2018 15:43:54 -0500 Subject: [PATCH 2/5] Another minor change in Table of Contents. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index c97c063506..40458e3865 100644 --- a/README.rst +++ b/README.rst @@ -145,7 +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 SageMaaker Estimators <##scikit-learan-sagemaker-estimaators>`__ +* `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>`__ From a9afd19419f8fea0164e55647a4e885ca88c28df Mon Sep 17 00:00:00 2001 From: Eric Kim Date: Tue, 11 Dec 2018 15:57:44 -0500 Subject: [PATCH 3/5] Fixing minor doc change in sklearn. --- src/sagemaker/sklearn/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sagemaker/sklearn/README.rst b/src/sagemaker/sklearn/README.rst index 5464c9bfe7..c615af3ed9 100644 --- a/src/sagemaker/sklearn/README.rst +++ b/src/sagemaker/sklearn/README.rst @@ -186,8 +186,8 @@ The following are optional arguments. When you create a ``SKLearn`` object, you - ``image_name`` An alternative docker image to use for training and 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 + framework_version and py_version. Refer to: `SageMaker Scikit-learn Docker Container + <#sagemaker-sklearn-docker-container>`_ for details on what the official images support and where to find the source code to build your custom image. From a3328e70e34181a353e3f0706de7b1ec59894e1b Mon Sep 17 00:00:00 2001 From: Eric Kim Date: Tue, 11 Dec 2018 15:59:28 -0500 Subject: [PATCH 4/5] Second minor fix in sklearn docs. --- src/sagemaker/sklearn/README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sagemaker/sklearn/README.rst b/src/sagemaker/sklearn/README.rst index c615af3ed9..29bb44d9f6 100644 --- a/src/sagemaker/sklearn/README.rst +++ b/src/sagemaker/sklearn/README.rst @@ -187,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 Container - <#sagemaker-sklearn-docker-container>`_ for details on what the official images support + <#sagemaker-scikit-learn-docker-container>`_ for details on what the official images support and where to find the source code to build your custom image. @@ -604,8 +604,8 @@ 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 Container +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When training and deploying training scripts, SageMaker runs your Python script in a Docker container with several libraries installed. When creating the Estimator and calling deploy to create the SageMaker Endpoint, you can control From e0c256abba0311df363bbb173273b61d5af74179 Mon Sep 17 00:00:00 2001 From: Eric Kim Date: Tue, 11 Dec 2018 16:14:26 -0500 Subject: [PATCH 5/5] Fix sklearn doc. --- src/sagemaker/sklearn/README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sagemaker/sklearn/README.rst b/src/sagemaker/sklearn/README.rst index 29bb44d9f6..c0ee4fd7b6 100644 --- a/src/sagemaker/sklearn/README.rst +++ b/src/sagemaker/sklearn/README.rst @@ -186,8 +186,8 @@ The following are optional arguments. When you create a ``SKLearn`` object, you - ``image_name`` An alternative docker image to use for training and 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 Container - <#sagemaker-scikit-learn-docker-container>`_ for details on what the official images support + framework_version and py_version. Refer to: `SageMaker Scikit-learn Docker Containers + <#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. @@ -604,8 +604,8 @@ 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 Container -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +SageMaker Scikit-learn Docker Containers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When training and deploying training scripts, SageMaker runs your Python script in a Docker container with several libraries installed. When creating the Estimator and calling deploy to create the SageMaker Endpoint, you can control