AWS sagemaker documentation change
Summary
Replaced 'estimator' with 'ModelTrainer', added SDK version-specific code examples, and updated checkpoint path uniqueness recommendation.
Security assessment
Changes involve SDK terminology updates and checkpoint configuration best practices. The S3 path uniqueness recommendation addresses performance, not security vulnerabilities. No evidence of security fixes or security features added.
Diff
diff --git a/sagemaker/latest/dg/distributed-troubleshooting-model-parallel.md b/sagemaker/latest/dg/distributed-troubleshooting-model-parallel.md index 76ff10998..cd67607af 100644 --- a//sagemaker/latest/dg/distributed-troubleshooting-model-parallel.md +++ b//sagemaker/latest/dg/distributed-troubleshooting-model-parallel.md @@ -37 +37,24 @@ SageMaker Debugger is not available for the SageMaker model parallelism library. -To fix this issue, disable Debugger by passing `debugger_hook_config=False` when creating a framework `estimator` as shown in the following example. +To fix this issue, disable Debugger by passing `debugger_hook_config=False` when creating a framework `ModelTrainer` as shown in the following example. + +SageMaker Python SDK v3 + + + + bucket=Session().default_bucket() + base_job_name="sagemaker-checkpoint-test" + checkpoint_in_bucket="checkpoints" + + # The S3 URI to store the checkpoints + checkpoint_s3_bucket="s3://{}/{}/{}".format(bucket, base_job_name, checkpoint_in_bucket) + + model_trainer = ModelTrainer( + ... + + distribution={"smdistributed": {"modelparallel": { "enabled": True }}}, + checkpoint_s3_uri=checkpoint_s3_bucket, + checkpoint_local_path="/opt/ml/checkpoints", + debugger_hook_config=False + ) + +SageMaker Python SDK v2 (Legacy) + @@ -65 +88 @@ This could be caused by a SageMaker AI limitation while uploading the local chec -If you run into the preceding error, do not use `checkpoint_s3_uri` with the SageMaker `estimator` call. While saving checkpoints for larger models, we recommend saving checkpoints to a custom directory and passing the same to the helper function (as a `local_path` argument). +If you run into the preceding error, do not use `checkpoint_s3_uri` with the SageMaker `ModelTrainer` call. While saving checkpoints for larger models, we recommend saving checkpoints to a custom directory and passing the same to the helper function (as a `local_path` argument). @@ -169 +192 @@ For more information about checkpointing a model with model parallelism, see [Ge - * If you find that your training job takes a long time during the data downloading stage, make sure the Amazon S3 path you provided to `checkpoint_s3_uri` for the SageMaker `Estimator` class is unique for the current training job. If this path is reused across multiple training jobs running simultaneously, all those checkpoints are uploaded and downloaded to the same Amazon S3 path and might significantly increase checkpoint loading time. + * If you find that your training job takes a long time during the data downloading stage, make sure the Amazon S3 path you provided to `checkpoint_s3_uri` for the SageMaker `ModelTrainer` class is unique for the current training job. If this path is reused across multiple training jobs running simultaneously, all those checkpoints are uploaded and downloaded to the same Amazon S3 path and might significantly increase checkpoint loading time.