diff --git a/src/sagemaker/estimator.py b/src/sagemaker/estimator.py index 4800c9ed11..4cb03c466e 100644 --- a/src/sagemaker/estimator.py +++ b/src/sagemaker/estimator.py @@ -166,10 +166,44 @@ def __init__( instance_type (str): Type of EC2 instance to use for training, for example, ``'ml.c4.xlarge'``. Required if instance_groups is not set. - volume_size (int): Size in GB of the EBS volume to use for - storing input data during training (default: 30). Must be large - enough to store training data if File Mode is used (which is the - default). + volume_size (int): Size in GB of the storage volume to use for + storing input and output data during training (default: 30). + + Must be large enough to store training data if File mode is + used, which is the default mode. + + When you use an ML instance with the EBS-only storage option + such as ``ml.c5`` and ``ml.p2``, + you must define the size of the EBS + volume through the ``volume_size`` parameter in the estimator class. + + .. note:: + + When you use an ML instance with `NVMe SSD volumes + `_ + such as ``ml.p4d``, ``ml.g4dn``, and ``ml.g5``, + do not include this parameter in the estimator configuration. + If you use one of those ML instance types, + SageMaker doesn't provision Amazon EBS General Purpose SSD + (gp2) storage nor take this parameter to adjust the NVMe instance storage. + Available storage is fixed to the NVMe instance storage + capacity. SageMaker configures storage paths for training + datasets, checkpoints, model artifacts, and outputs to use the + entire capacity of the instance storage. + + Note that if you include this parameter and specify a number that + exceeds the size of the NVMe volume attached to the instance type, + SageMaker returns an ``Invalid VolumeSizeInGB`` error. + + To look up instance types and their instance storage types + and volumes, see `Amazon EC2 Instance Types + `_. + + To find the default local paths defined by the SageMaker + training platform, see `Amazon SageMaker Training Storage + Folders for Training Datasets, Checkpoints, Model Artifacts, + and Outputs + `_. volume_kms_key (str): Optional. KMS key ID for encrypting EBS volume attached to the training instance (default: None). max_run (int): Timeout in seconds for training (default: 24 * @@ -2232,12 +2266,46 @@ def __init__( instance_count (int): Number of Amazon EC2 instances to use for training. Required if instance_groups is not set. instance_type (str): Type of EC2 instance to use for training, - for example, 'ml.c4.xlarge'. Required if instance_groups is + for example, ``'ml.c4.xlarge'``. Required if instance_groups is not set. - volume_size (int): Size in GB of the EBS volume to use for - storing input data during training (default: 30). Must be large - enough to store training data if File Mode is used (which is the - default). + volume_size (int): Size in GB of the storage volume to use for + storing input and output data during training (default: 30). + + Must be large enough to store training data if File mode is + used, which is the default mode. + + When you use an ML instance with the EBS-only storage option + such as ``ml.c5`` and ``ml.p2``, + you must define the size of the EBS + volume through the ``volume_size`` parameter in the estimator class. + + .. note:: + + When you use an ML instance with `NVMe SSD volumes + `_ + such as ``ml.p4d``, ``ml.g4dn``, and ``ml.g5``, + do not include this parameter in the estimator configuration. + If you use one of those ML instance types, + SageMaker doesn't provision Amazon EBS General Purpose SSD + (gp2) storage nor take this parameter to adjust the NVMe instance storage. + Available storage is fixed to the NVMe instance storage + capacity. SageMaker configures storage paths for training + datasets, checkpoints, model artifacts, and outputs to use the + entire capacity of the instance storage. + + Note that if you include this parameter and specify a number that + exceeds the size of the NVMe volume attached to the instance type, + SageMaker returns an ``Invalid VolumeSizeInGB`` error. + + To look up instance types and their instance storage types + and volumes, see `Amazon EC2 Instance Types + `_. + + To find the default local paths defined by the SageMaker + training platform, see `Amazon SageMaker Training Storage + Folders for Training Datasets, Checkpoints, Model Artifacts, + and Outputs + `_. volume_kms_key (str): Optional. KMS key ID for encrypting EBS volume attached to the training instance (default: None). max_run (int): Timeout in seconds for training (default: 24 *