Class HyperParameterTuningJobConfig

java.lang.Object
software.amazon.awssdk.services.sagemaker.model.HyperParameterTuningJobConfig
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<HyperParameterTuningJobConfig.Builder,HyperParameterTuningJobConfig>

@Generated("software.amazon.awssdk:codegen") public final class HyperParameterTuningJobConfig extends Object implements SdkPojo, Serializable, ToCopyableBuilder<HyperParameterTuningJobConfig.Builder,HyperParameterTuningJobConfig>

Configures a hyperparameter tuning job.

See Also:
  • Method Details

    • strategy

      public final HyperParameterTuningJobStrategyType strategy()

      Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training job it launches. For information about search strategies, see How Hyperparameter Tuning Works.

      If the service returns an enum value that is not available in the current SDK version, strategy will return HyperParameterTuningJobStrategyType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from strategyAsString().

      Returns:
      Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training job it launches. For information about search strategies, see How Hyperparameter Tuning Works.
      See Also:
    • strategyAsString

      public final String strategyAsString()

      Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training job it launches. For information about search strategies, see How Hyperparameter Tuning Works.

      If the service returns an enum value that is not available in the current SDK version, strategy will return HyperParameterTuningJobStrategyType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from strategyAsString().

      Returns:
      Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training job it launches. For information about search strategies, see How Hyperparameter Tuning Works.
      See Also:
    • strategyConfig

      public final HyperParameterTuningJobStrategyConfig strategyConfig()

      The configuration for the Hyperband optimization strategy. This parameter should be provided only if Hyperband is selected as the strategy for HyperParameterTuningJobConfig.

      Returns:
      The configuration for the Hyperband optimization strategy. This parameter should be provided only if Hyperband is selected as the strategy for HyperParameterTuningJobConfig .
    • hyperParameterTuningJobObjective

      public final HyperParameterTuningJobObjective hyperParameterTuningJobObjective()

      The HyperParameterTuningJobObjective specifies the objective metric used to evaluate the performance of training jobs launched by this tuning job.

      Returns:
      The HyperParameterTuningJobObjective specifies the objective metric used to evaluate the performance of training jobs launched by this tuning job.
    • resourceLimits

      public final ResourceLimits resourceLimits()

      The ResourceLimits object that specifies the maximum number of training and parallel training jobs that can be used for this hyperparameter tuning job.

      Returns:
      The ResourceLimits object that specifies the maximum number of training and parallel training jobs that can be used for this hyperparameter tuning job.
    • parameterRanges

      public final ParameterRanges parameterRanges()

      The ParameterRanges object that specifies the ranges of hyperparameters that this tuning job searches over to find the optimal configuration for the highest model performance against your chosen objective metric.

      Returns:
      The ParameterRanges object that specifies the ranges of hyperparameters that this tuning job searches over to find the optimal configuration for the highest model performance against your chosen objective metric.
    • trainingJobEarlyStoppingType

      public final TrainingJobEarlyStoppingType trainingJobEarlyStoppingType()

      Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. Because the Hyperband strategy has its own advanced internal early stopping mechanism, TrainingJobEarlyStoppingType must be OFF to use Hyperband. This parameter can take on one of the following values (the default value is OFF):

      OFF

      Training jobs launched by the hyperparameter tuning job do not use early stopping.

      AUTO

      SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early.

      If the service returns an enum value that is not available in the current SDK version, trainingJobEarlyStoppingType will return TrainingJobEarlyStoppingType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from trainingJobEarlyStoppingTypeAsString().

      Returns:
      Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. Because the Hyperband strategy has its own advanced internal early stopping mechanism, TrainingJobEarlyStoppingType must be OFF to use Hyperband. This parameter can take on one of the following values (the default value is OFF):

      OFF

      Training jobs launched by the hyperparameter tuning job do not use early stopping.

      AUTO

      SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early.

      See Also:
    • trainingJobEarlyStoppingTypeAsString

      public final String trainingJobEarlyStoppingTypeAsString()

      Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. Because the Hyperband strategy has its own advanced internal early stopping mechanism, TrainingJobEarlyStoppingType must be OFF to use Hyperband. This parameter can take on one of the following values (the default value is OFF):

      OFF

      Training jobs launched by the hyperparameter tuning job do not use early stopping.

      AUTO

      SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early.

      If the service returns an enum value that is not available in the current SDK version, trainingJobEarlyStoppingType will return TrainingJobEarlyStoppingType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from trainingJobEarlyStoppingTypeAsString().

      Returns:
      Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. Because the Hyperband strategy has its own advanced internal early stopping mechanism, TrainingJobEarlyStoppingType must be OFF to use Hyperband. This parameter can take on one of the following values (the default value is OFF):

      OFF

      Training jobs launched by the hyperparameter tuning job do not use early stopping.

      AUTO

      SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early.

      See Also:
    • tuningJobCompletionCriteria

      public final TuningJobCompletionCriteria tuningJobCompletionCriteria()

      The tuning job's completion criteria.

      Returns:
      The tuning job's completion criteria.
    • randomSeed

      public final Integer randomSeed()

      A value used to initialize a pseudo-random number generator. Setting a random seed and using the same seed later for the same tuning job will allow hyperparameter optimization to find more a consistent hyperparameter configuration between the two runs.

      Returns:
      A value used to initialize a pseudo-random number generator. Setting a random seed and using the same seed later for the same tuning job will allow hyperparameter optimization to find more a consistent hyperparameter configuration between the two runs.
    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<HyperParameterTuningJobConfig.Builder,HyperParameterTuningJobConfig>
      Returns:
      a builder for type T
    • builder

      public static HyperParameterTuningJobConfig.Builder builder()
    • serializableBuilderClass

      public static Class<? extends HyperParameterTuningJobConfig.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.