Skip to content

Commit c217a4c

Browse files
ericangelokimnadiaya
authored andcommitted
Sklearn documentation (#545)
1 parent d8d4100 commit c217a4c

File tree

2 files changed

+37
-20
lines changed

2 files changed

+37
-20
lines changed

README.rst

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,19 @@ Table of Contents
3232
4. `TensorFlow SageMaker Estimators <#tensorflow-sagemaker-estimators>`__
3333
5. `Chainer SageMaker Estimators <#chainer-sagemaker-estimators>`__
3434
6. `PyTorch SageMaker Estimators <#pytorch-sagemaker-estimators>`__
35-
7. `SageMaker Reinforcement Learning Estimators <#sagemaker-reinforcement-learning-estimators>`__
36-
8. `SageMaker SparkML Serving <#sagemaker-sparkml-serving>`__
37-
9. `AWS SageMaker Estimators <#aws-sagemaker-estimators>`__
38-
10. `Using SageMaker AlgorithmEstimators <#using-sagemaker-algorithmestimators>`__
39-
11. `Consuming SageMaker Model Packages <#consuming-sagemaker-model-packages>`__
40-
12. `BYO Docker Containers with SageMaker Estimators <#byo-docker-containers-with-sagemaker-estimators>`__
41-
13. `SageMaker Automatic Model Tuning <#sagemaker-automatic-model-tuning>`__
42-
14. `SageMaker Batch Transform <#sagemaker-batch-transform>`__
43-
15. `Secure Training and Inference with VPC <#secure-training-and-inference-with-vpc>`__
44-
16. `BYO Model <#byo-model>`__
45-
17. `Inference Pipelines <#inference-pipelines>`__
46-
18. `SageMaker Workflow <#sagemaker-workflow>`__
35+
7. `Scikit-learn SageMaker Estimators <#scikit-learn-sagemaker-estimators>`__
36+
8. `SageMaker Reinforcement Learning Estimators <#sagemaker-reinforcement-learning-estimators>`__
37+
9. `SageMaker SparkML Serving <#sagemaker-sparkml-serving>`__
38+
10. `AWS SageMaker Estimators <#aws-sagemaker-estimators>`__
39+
11. `Using SageMaker AlgorithmEstimators <#using-sagemaker-algorithmestimators>`__
40+
12. `Consuming SageMaker Model Packages <#consuming-sagemaker-model-packages>`__
41+
13. `BYO Docker Containers with SageMaker Estimators <#byo-docker-containers-with-sagemaker-estimators>`__
42+
14. `SageMaker Automatic Model Tuning <#sagemaker-automatic-model-tuning>`__
43+
15. `SageMaker Batch Transform <#sagemaker-batch-transform>`__
44+
16. `Secure Training and Inference with VPC <#secure-training-and-inference-with-vpc>`__
45+
17. `BYO Model <#byo-model>`__
46+
18. `Inference Pipelines <#inference-pipelines>`__
47+
19. `SageMaker Workflow <#sagemaker-workflow>`__
4748

4849

4950
Installing the SageMaker Python SDK
@@ -144,6 +145,7 @@ The following sections of this document explain how to use the different estimat
144145
* `TensorFlow SageMaker Estimators and Models <#tensorflow-sagemaker-estimators>`__
145146
* `Chainer SageMaker Estimators and Models <#chainer-sagemaker-estimators>`__
146147
* `PyTorch SageMaker Estimators <#pytorch-sagemaker-estimators>`__
148+
* `Scikit-learn SageMaker Estimators and Models <#scikit-learn-sagemaker-estimators>`__
147149
* `SageMaker Reinforcement Learning Estimators <#sagemaker-reinforcement-learning-estimators>`__
148150
* `AWS SageMaker Estimators and Models <#aws-sagemaker-estimators>`__
149151
* `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
418420
.. _PyTorch SageMaker Estimators and Models: src/sagemaker/pytorch/README.rst
419421
420422
423+
Scikit-learn SageMaker Estimators
424+
---------------------------------
425+
426+
With Scikit-learn SageMaker ``Estimators``, you can train and host Scikit-learn models on Amazon SageMaker.
427+
428+
Supported versions of Scikit-learn: ``0.20.0``.
429+
430+
We recommend that you use the latest supported version, because that's where we focus most of our development efforts.
431+
432+
For more information about Scikit-learn, see https://scikit-learn.org/stable/
433+
434+
For more information about Scikit-learn SageMaker ``Estimators``, see `Scikit-learn SageMaker Estimators and Models`_.
435+
436+
.. _Scikit-learn SageMaker Estimators and Models: src/sagemaker/sklearn/README.rst
437+
438+
421439
SageMaker Reinforcement Learning Estimators
422440
-------------------------------------------
423441

src/sagemaker/sklearn/README.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Table of Contents
1818
5. `SageMaker Scikit-learn Model Server <#sagemaker-scikit-learn-model-server>`__
1919
6. `Working with Existing Model Data and Training Jobs <#working-with-existing-model-data-and-training-jobs>`__
2020
7. `Scikit-learn Training Examples <#scikit-learn-training-examples>`__
21-
8. `SageMaker PyTorch Docker Containers <#sagemaker-pytorch-docker-containers>`__
21+
8. `SageMaker Scikit-learn Docker Containers <#sagemaker-scikit-learn-docker-containers>`__
2222

2323

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

6363
* ``SM_MODEL_DIR``: A string representing the path to the directory to write model artifacts to.
6464
These artifacts are uploaded to S3 for model hosting.
65-
* ``SM_NUM_GPUS``: An integer representing the number of GPUs available to the host.
6665
* ``SM_OUTPUT_DATA_DIR``: A string representing the filesystem path to write output artifacts to. Output artifacts may
6766
include checkpoints, graphs, and other files to save, not including model artifacts. These artifacts are compressed
6867
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.
109108
For more on training environment variables, please visit https://github.com/aws/sagemaker-containers.
110109

111110
Running a Scikit-learn training script in SageMaker
112-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113112

114113
You run Scikit-learn training scripts on SageMaker by creating ``SKLearn`` Estimators.
115114
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
188187
serving. If specified, the estimator will use this image for training and
189188
hosting, instead of selecting the appropriate SageMaker official image based on
190189
framework_version and py_version. Refer to: `SageMaker Scikit-learn Docker Containers
191-
<#sagemaker-sklearn-docker-containers>`_ for details on what the Official images support
190+
<#sagemaker-scikit-learn-docker-containers>`_ for details on what the official images support
192191
and where to find the source code to build your custom image.
193192

194193

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

293292

294293
SageMaker Scikit-learn Model Server
295-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
294+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
296295

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

607606

608-
SageMaker Scikit-learn Docker containers
607+
SageMaker Scikit-learn Docker Containers
609608
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
610609

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

0 commit comments

Comments
 (0)