AWS sagemaker documentation change
Summary
Removed outdated SageMaker Python SDK v2 (Legacy) sections and code examples, streamlining documentation to focus on SDK v3.
Security assessment
Changes involve removing legacy code samples and references without any security context. No vulnerabilities, security features, or incidents are mentioned.
Diff
diff --git a/sagemaker/latest/dg/distributed-training-get-started.md b/sagemaker/latest/dg/distributed-training-get-started.md index 5b01009b9..6e3a8b70c 100644 --- a//sagemaker/latest/dg/distributed-training-get-started.md +++ b//sagemaker/latest/dg/distributed-training-get-started.md @@ -19,3 +18,0 @@ SageMaker Training supports distributed training on a single instance as well as -SageMaker Python SDK v3 - - @@ -24,5 +20,0 @@ We recommend you to use the ModelTrainer class with [PyTorch](https://sagemaker. -SageMaker Python SDK v2 (Legacy) - - -We recommend you to use the framework estimator classes such as [PyTorch](https://sagemaker.readthedocs.io/en/stable/frameworks/pytorch/sagemaker.pytorch.html#pytorch-estimator) and [TensorFlow](https://sagemaker.readthedocs.io/en/stable/frameworks/tensorflow/sagemaker.tensorflow.html#tensorflow-estimator) in the SageMaker Python SDK, which are the training job launchers with various distributed training options. When you create an estimator object, the object sets up distributed training infrastructure, runs the `CreateTrainingJob` API in the backend, finds the Region where your current session is running, and pulls one of the pre-built AWS deep learning container prepackaged with a number of libraries including deep learning frameworks, distributed training frameworks, and the [EFA](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) driver. If you want to mount an FSx file system to the training instances, you need to pass your VPC subnet and security group ID to the estimator. - @@ -43,3 +34,0 @@ The SMDDP library improves communication between nodes with implementations of ` -SageMaker Python SDK v3 - - @@ -58,16 +46,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - - from sagemaker.pytorch import PyTorch - - estimator = PyTorch( - ..., - instance_count=2, - instance_type="ml.p4d.24xlarge", - # Activate distributed training with SMDDP - distribution={ "pytorchddp": { "enabled": True } } # mpirun, activates SMDDP AllReduce OR AllGather - # distribution={ "torch_distributed": { "enabled": True } } # torchrun, activates SMDDP AllGather - # distribution={ "smdistributed": { "dataparallel": { "enabled": True } } } # mpirun, activates SMDDP AllReduce OR AllGather - ) - @@ -82,3 +54,0 @@ To use SageMaker AI's model parallelism library, configure the `distribution` pa -SageMaker Python SDK v3 - - @@ -87,8 +56,0 @@ The ModelTrainer class supports [PyTorch](https://sagemaker.readthedocs.io/en/st -SageMaker Python SDK v2 (Legacy) - - -Supported framework estimators are [PyTorch](https://sagemaker.readthedocs.io/en/stable/frameworks/pytorch/sagemaker.pytorch.html#pytorch-estimator) and [TensorFlow](https://sagemaker.readthedocs.io/en/stable/frameworks/tensorflow/sagemaker.tensorflow.html#tensorflow-estimator). The following code example shows how to construct a framework estimator for distributed training with the model parallelism library on two `ml.p4d.24xlarge` instances. - -SageMaker Python SDK v3 - - @@ -106,28 +67,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - - from sagemaker.framework import Framework - - distribution={ - "smdistributed": { - "modelparallel": { - "enabled":True, - "parameters": { - ... # enter parameter key-value pairs here - } - }, - }, - "mpi": { - "enabled" : True, - ... # enter parameter key-value pairs here - } - } - - estimator = Framework( - ..., - instance_count=2, - instance_type="ml.p4d.24xlarge", - distribution=_distribution_ - ) - @@ -146,3 +79,0 @@ This option is available for PyTorch 1.12.0 and later. -SageMaker Python SDK v3 - - @@ -159,12 +89,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - from sagemaker.pytorch import PyTorch - - estimator = PyTorch( - ..., - instance_count=2, - instance_type="ml.p4d.24xlarge", - distribution={"pytorchddp": {"enabled": True}} # runs mpirun in the backend - ) - @@ -181,3 +99,0 @@ The following code snippet shows an example of constructing a SageMaker AI PyTor -SageMaker Python SDK v3 - - @@ -194,12 +109,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - from sagemaker.pytorch import PyTorch - - estimator = PyTorch( - ..., - instance_count=2, - instance_type="ml.p4d.24xlarge", - distribution={"torch_distributed": {"enabled": True}} # runs torchrun in the backend - ) -