Class HyperParameterTuningResourceConfig
- java.lang.Object
-
- software.amazon.awssdk.services.sagemaker.model.HyperParameterTuningResourceConfig
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<HyperParameterTuningResourceConfig.Builder,HyperParameterTuningResourceConfig>
@Generated("software.amazon.awssdk:codegen") public final class HyperParameterTuningResourceConfig extends Object implements SdkPojo, Serializable, ToCopyableBuilder<HyperParameterTuningResourceConfig.Builder,HyperParameterTuningResourceConfig>
The configuration of resources, including compute instances and storage volumes for use in training jobs launched by hyperparameter tuning jobs.
HyperParameterTuningResourceConfigis similar toResourceConfig, but has the additionalInstanceConfigsandAllocationStrategyfields to allow for flexible instance management. Specify one or more instance types, count, and the allocation strategy for instance selection.HyperParameterTuningResourceConfigsupports the capabilities ofResourceConfigwith the exception ofKeepAlivePeriodInSeconds. Hyperparameter tuning jobs use warm pools by default, which reuse clusters between training jobs.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHyperParameterTuningResourceConfig.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HyperParameterTuningAllocationStrategyallocationStrategy()The strategy that determines the order of preference for resources specified inInstanceConfigsused in hyperparameter optimization.StringallocationStrategyAsString()The strategy that determines the order of preference for resources specified inInstanceConfigsused in hyperparameter optimization.static HyperParameterTuningResourceConfig.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasInstanceConfigs()For responses, this returns true if the service returned a value for the InstanceConfigs property.List<HyperParameterTuningInstanceConfig>instanceConfigs()A list containing the configuration(s) for one or more resources for processing hyperparameter jobs.IntegerinstanceCount()The number of compute instances of typeInstanceTypeto use.TrainingInstanceTypeinstanceType()The instance type used to run hyperparameter optimization tuning jobs.StringinstanceTypeAsString()The instance type used to run hyperparameter optimization tuning jobs.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends HyperParameterTuningResourceConfig.Builder>serializableBuilderClass()HyperParameterTuningResourceConfig.BuildertoBuilder()StringtoString()Returns a string representation of this object.StringvolumeKmsKeyId()A key used by Amazon Web Services Key Management Service to encrypt data on the storage volume attached to the compute instances used to run the training job.IntegervolumeSizeInGB()The volume size in GB for the storage volume to be used in processing hyperparameter optimization jobs (optional).-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
instanceType
public final TrainingInstanceType instanceType()
The instance type used to run hyperparameter optimization tuning jobs. See descriptions of instance types for more information.
If the service returns an enum value that is not available in the current SDK version,
instanceTypewill returnTrainingInstanceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frominstanceTypeAsString().- Returns:
- The instance type used to run hyperparameter optimization tuning jobs. See descriptions of instance types for more information.
- See Also:
TrainingInstanceType
-
instanceTypeAsString
public final String instanceTypeAsString()
The instance type used to run hyperparameter optimization tuning jobs. See descriptions of instance types for more information.
If the service returns an enum value that is not available in the current SDK version,
instanceTypewill returnTrainingInstanceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frominstanceTypeAsString().- Returns:
- The instance type used to run hyperparameter optimization tuning jobs. See descriptions of instance types for more information.
- See Also:
TrainingInstanceType
-
instanceCount
public final Integer instanceCount()
The number of compute instances of type
InstanceTypeto use. For distributed training, select a value greater than 1.- Returns:
- The number of compute instances of type
InstanceTypeto use. For distributed training, select a value greater than 1.
-
volumeSizeInGB
public final Integer volumeSizeInGB()
The volume size in GB for the storage volume to be used in processing hyperparameter optimization jobs (optional). These volumes store model artifacts, incremental states and optionally, scratch space for training algorithms. Do not provide a value for this parameter if a value for
InstanceConfigsis also specified.Some instance types have a fixed total local storage size. If you select one of these instances for training,
VolumeSizeInGBcannot be greater than this total size. For a list of instance types with local instance storage and their sizes, see instance store volumes.SageMaker supports only the General Purpose SSD (gp2) storage volume type.
- Returns:
- The volume size in GB for the storage volume to be used in processing hyperparameter optimization jobs
(optional). These volumes store model artifacts, incremental states and optionally, scratch space for
training algorithms. Do not provide a value for this parameter if a value for
InstanceConfigsis also specified.Some instance types have a fixed total local storage size. If you select one of these instances for training,
VolumeSizeInGBcannot be greater than this total size. For a list of instance types with local instance storage and their sizes, see instance store volumes.SageMaker supports only the General Purpose SSD (gp2) storage volume type.
-
volumeKmsKeyId
public final String volumeKmsKeyId()
A key used by Amazon Web Services Key Management Service to encrypt data on the storage volume attached to the compute instances used to run the training job. You can use either of the following formats to specify a key.
KMS Key ID:
"1234abcd-12ab-34cd-56ef-1234567890ab"Amazon Resource Name (ARN) of a KMS key:
"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"Some instances use local storage, which use a hardware module to encrypt storage volumes. If you choose one of these instance types, you cannot request a
VolumeKmsKeyId. For a list of instance types that use local storage, see instance store volumes. For more information about Amazon Web Services Key Management Service, see KMS encryption for more information.- Returns:
- A key used by Amazon Web Services Key Management Service to encrypt data on the storage volume attached
to the compute instances used to run the training job. You can use either of the following formats to
specify a key.
KMS Key ID:
"1234abcd-12ab-34cd-56ef-1234567890ab"Amazon Resource Name (ARN) of a KMS key:
"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"Some instances use local storage, which use a hardware module to encrypt storage volumes. If you choose one of these instance types, you cannot request a
VolumeKmsKeyId. For a list of instance types that use local storage, see instance store volumes. For more information about Amazon Web Services Key Management Service, see KMS encryption for more information.
-
allocationStrategy
public final HyperParameterTuningAllocationStrategy allocationStrategy()
The strategy that determines the order of preference for resources specified in
InstanceConfigsused in hyperparameter optimization.If the service returns an enum value that is not available in the current SDK version,
allocationStrategywill returnHyperParameterTuningAllocationStrategy.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromallocationStrategyAsString().- Returns:
- The strategy that determines the order of preference for resources specified in
InstanceConfigsused in hyperparameter optimization. - See Also:
HyperParameterTuningAllocationStrategy
-
allocationStrategyAsString
public final String allocationStrategyAsString()
The strategy that determines the order of preference for resources specified in
InstanceConfigsused in hyperparameter optimization.If the service returns an enum value that is not available in the current SDK version,
allocationStrategywill returnHyperParameterTuningAllocationStrategy.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromallocationStrategyAsString().- Returns:
- The strategy that determines the order of preference for resources specified in
InstanceConfigsused in hyperparameter optimization. - See Also:
HyperParameterTuningAllocationStrategy
-
hasInstanceConfigs
public final boolean hasInstanceConfigs()
For responses, this returns true if the service returned a value for the InstanceConfigs property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
instanceConfigs
public final List<HyperParameterTuningInstanceConfig> instanceConfigs()
A list containing the configuration(s) for one or more resources for processing hyperparameter jobs. These resources include compute instances and storage volumes to use in model training jobs launched by hyperparameter tuning jobs. The
AllocationStrategycontrols the order in which multiple configurations provided inInstanceConfigsare used.If you only want to use a single instance configuration inside the
HyperParameterTuningResourceConfigAPI, do not provide a value forInstanceConfigs. Instead, useInstanceType,VolumeSizeInGBandInstanceCount. If you useInstanceConfigs, do not provide values forInstanceType,VolumeSizeInGBorInstanceCount.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInstanceConfigs()method.- Returns:
- A list containing the configuration(s) for one or more resources for processing hyperparameter jobs.
These resources include compute instances and storage volumes to use in model training jobs launched by
hyperparameter tuning jobs. The
AllocationStrategycontrols the order in which multiple configurations provided inInstanceConfigsare used.If you only want to use a single instance configuration inside the
HyperParameterTuningResourceConfigAPI, do not provide a value forInstanceConfigs. Instead, useInstanceType,VolumeSizeInGBandInstanceCount. If you useInstanceConfigs, do not provide values forInstanceType,VolumeSizeInGBorInstanceCount.
-
toBuilder
public HyperParameterTuningResourceConfig.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<HyperParameterTuningResourceConfig.Builder,HyperParameterTuningResourceConfig>
-
builder
public static HyperParameterTuningResourceConfig.Builder builder()
-
serializableBuilderClass
public static Class<? extends HyperParameterTuningResourceConfig.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-