Skip to content

Commit e20193e

Browse files
authored
documentation: adding versioning to sm distributed data parallel docs (#2120)
1 parent f09d912 commit e20193e

File tree

6 files changed

+84
-48
lines changed

6 files changed

+84
-48
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
Version 1.0.0 (Latest)
3+
======================
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
v1.0.0/smd_data_parallel_pytorch.rst
9+
v1.0.0/smd_data_parallel_tensorflow.rst

doc/api/training/smd_data_parallel.rst

Lines changed: 62 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,36 @@ SageMaker's distributed data parallel library extends SageMaker’s training
66
capabilities on deep learning models with near-linear scaling efficiency,
77
achieving fast time-to-train with minimal code changes.
88

9-
- optimizes your training job for AWS network infrastructure and EC2 instance topology.
10-
- takes advantage of gradient update to communicate between nodes with a custom AllReduce algorithm.
11-
129
When training a model on a large amount of data, machine learning practitioners
1310
will often turn to distributed training to reduce the time to train.
1411
In some cases, where time is of the essence,
1512
the business requirement is to finish training as quickly as possible or at
1613
least within a constrained time period.
1714
Then, distributed training is scaled to use a cluster of multiple nodes,
1815
meaning not just multiple GPUs in a computing instance, but multiple instances
19-
with multiple GPUs. As the cluster size increases, so does the significant drop
20-
in performance. This drop in performance is primarily caused the communications
21-
overhead between nodes in a cluster.
16+
with multiple GPUs. However, as the cluster size increases, it is possible to see a significant drop
17+
in performance due to communications overhead between nodes in a cluster.
2218

23-
.. important::
24-
The distributed data parallel library only supports training jobs using CUDA 11. When you define a PyTorch or TensorFlow
25-
``Estimator`` with ``dataparallel`` parameter ``enabled`` set to ``True``,
26-
it uses CUDA 11. When you extend or customize your own training image
27-
you must use a CUDA 11 base image. See
28-
`SageMaker Python SDK's distributed data parallel library APIs
29-
<https://docs.aws.amazon.com/sagemaker/latest/dg/data-parallel-use-api.html#data-parallel-use-python-skd-api>`__
30-
for more information.
19+
SageMaker's distributed data parallel library addresses communications overhead in two ways:
3120

32-
.. rubric:: Customize your training script
21+
1. The library performs AllReduce, a key operation during distributed training that is responsible for a
22+
large portion of communication overhead.
23+
2. The library performs optimized node-to-node communication by fully utilizing AWS’s network
24+
infrastructure and Amazon EC2 instance topology.
3325

34-
To customize your own training script, you will need the following:
26+
To learn more about the core features of this library, see
27+
`Introduction to SageMaker's Distributed Data Parallel Library
28+
<https://docs.aws.amazon.com/sagemaker/latest/dg/data-parallel-intro.html>`_
29+
in the SageMaker Developer Guide.
3530

36-
.. raw:: html
31+
Use with the SageMaker Python SDK
32+
=================================
3733

38-
<div data-section-style="5" style="">
34+
To use the SageMaker distributed data parallel library with the SageMaker Python SDK, you will need the following:
3935

40-
- You must provide TensorFlow / PyTorch training scripts that are
41-
adapted to use the distributed data parallel library.
36+
- A TensorFlow or PyTorch training script that is
37+
adapted to use the distributed data parallel library. The :ref:`sdp_api_docs` includes
38+
framework specific examples of training scripts that are adapted to use this library.
4239
- Your input data must be in an S3 bucket or in FSx in the AWS region
4340
that you will use to launch your training job. If you use the Jupyter
4441
notebooks provided, create a SageMaker notebook instance in the same
@@ -47,32 +44,60 @@ To customize your own training script, you will need the following:
4744
the `SageMaker Python SDK data
4845
inputs <https://sagemaker.readthedocs.io/en/stable/overview.html#use-file-systems-as-training-inputs>`__ documentation.
4946

50-
.. raw:: html
47+
When you define
48+
a Pytorch or TensorFlow ``Estimator`` using the SageMaker Python SDK,
49+
you must select ``dataparallel`` as your ``distribution`` strategy:
50+
51+
.. code::
52+
53+
distribution = { "smdistributed": { "dataparallel": { "enabled": True } } }
54+
55+
We recommend you use one of the example notebooks as your template to launch a training job. When
56+
you use an example notebook you’ll need to swap your training script with the one that came with the
57+
notebook and modify any input functions as necessary. For instructions on how to get started using a
58+
Jupyter Notebook example, see `Distributed Training Jupyter Notebook Examples
59+
<https://docs.aws.amazon.com/sagemaker/latest/dg/distributed-training-notebook-examples.html>`_.
5160

52-
</div>
61+
Once you have launched a training job, you can monitor it using CloudWatch. To learn more, see
62+
`Monitor and Analyze Training Jobs Using Metrics
63+
<https://docs.aws.amazon.com/sagemaker/latest/dg/training-metrics.html>`_.
5364

54-
Use the API guides for each framework to see
55-
examples of training scripts that can be used to convert your training scripts.
56-
Then use one of the example notebooks as your template to launch a training job.
57-
You’ll need to swap your training script with the one that came with the
58-
notebook and modify any input functions as necessary.
59-
Once you have launched a training job, you can monitor it using CloudWatch.
6065

61-
Then you can see how to deploy your trained model to an endpoint by
62-
following one of the example notebooks for deploying a model. Finally,
63-
you can follow an example notebook to test inference on your deployed
64-
model.
66+
After you train a model, you can see how to deploy your trained model to an endpoint for inference by
67+
following one of the `example notebooks for deploying a model
68+
<https://sagemaker-examples.readthedocs.io/en/latest/inference/index.html>`_.
69+
For more information, see `Deploy Models for Inference
70+
<https://docs.aws.amazon.com/sagemaker/latest/dg/deploy-model.html>`_.
6571

72+
.. _sdp_api_docs:
6673

74+
API Documentation
75+
=================
76+
77+
This section contains the SageMaker distributed data parallel API documentation. If you are a
78+
new user of this library, it is recommended you use this guide alongside
79+
`SageMaker's Distributed Data Parallel Library
80+
<https://docs.aws.amazon.com/sagemaker/latest/dg/data-parallel.html>`_.
81+
82+
Select a version to see the API documentation for version.
6783

6884
.. toctree::
69-
:maxdepth: 2
85+
:maxdepth: 1
86+
87+
sdp_versions/v1_0_0.rst
88+
89+
.. important::
90+
The distributed data parallel library only supports training jobs using CUDA 11. When you define a PyTorch or TensorFlow
91+
``Estimator`` with ``dataparallel`` parameter ``enabled`` set to ``True``,
92+
it uses CUDA 11. When you extend or customize your own training image
93+
you must use a CUDA 11 base image. See
94+
`SageMaker Python SDK's distributed data parallel library APIs
95+
<https://docs.aws.amazon.com/sagemaker/latest/dg/data-parallel-use-api.html#data-parallel-use-python-skd-api>`_
96+
for more information.
7097

71-
sdp_versions/smd_data_parallel_pytorch
72-
sdp_versions/smd_data_parallel_tensorflow
7398

74-
Latest Updates
75-
==============
99+
Release Notes
100+
=============
76101

77102
New features, bug fixes, and improvements are regularly made to the SageMaker distributed data parallel library.
78103

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Sagemaker Distributed Data Parallel - Release Notes
1+
# Sagemaker Distributed Data Parallel 1.0.0 Release Notes
22

33
- First Release
44
- Getting Started
55

66
## First Release
7+
78
SageMaker's distributed data parallel library extends SageMaker’s training
89
capabilities on deep learning models with near-linear scaling efficiency,
910
achieving fast time-to-train with minimal code changes.
@@ -12,7 +13,8 @@ SageMaker Distributed Data Parallel:
1213
- optimizes your training job for AWS network infrastructure and EC2 instance topology.
1314
- takes advantage of gradient update to communicate between nodes with a custom AllReduce algorithm.
1415

15-
The library currently supports Tensorflow v2 and PyTorch via [AWS Deep Learning Containers](https://aws.amazon.com/machine-learning/containers/).
16+
The library currently supports TensorFlow v2 and PyTorch via [AWS Deep Learning Containers](https://aws.amazon.com/machine-learning/containers/).
1617

1718
## Getting Started
19+
1820
For getting started, refer to [SageMaker Distributed Data Parallel Python SDK Guide](https://docs.aws.amazon.com/sagemaker/latest/dg/data-parallel-use-api.html#data-parallel-use-python-skd-api).

doc/api/training/smd_model_parallel.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@ across multiple GPUs with minimal code changes. The library's API can be accesse
1111

1212
Use the following sections to learn more about the model parallelism and the library.
1313

14-
.. important::
15-
The model parallel library only supports training jobs using CUDA 11. When you define a PyTorch or TensorFlow
16-
``Estimator`` with ``modelparallel`` parameter ``enabled`` set to ``True``,
17-
it uses CUDA 11. When you extend or customize your own training image
18-
you must use a CUDA 11 base image. See
19-
`Extend or Adapt A Docker Container that Contains the Model Parallel Library
20-
<https://integ-docs-aws.amazon.com/sagemaker/latest/dg/model-parallel-use-api.html#model-parallel-customize-container>`__
21-
for more information.
22-
2314
Use with the SageMaker Python SDK
2415
=================================
2516

@@ -61,6 +52,15 @@ developer guide. This developer guide documentation includes:
6152
<https://docs.aws.amazon.com/sagemaker/latest/dg/model-parallel-customize-tips-pitfalls.html>`__
6253

6354

55+
.. important::
56+
The model parallel library only supports training jobs using CUDA 11. When you define a PyTorch or TensorFlow
57+
``Estimator`` with ``modelparallel`` parameter ``enabled`` set to ``True``,
58+
it uses CUDA 11. When you extend or customize your own training image
59+
you must use a CUDA 11 base image. See
60+
`Extend or Adapt A Docker Container that Contains the Model Parallel Library
61+
<https://integ-docs-aws.amazon.com/sagemaker/latest/dg/model-parallel-use-api.html#model-parallel-customize-container>`__
62+
for more information.
63+
6464
Release Notes
6565
=============
6666

0 commit comments

Comments
 (0)