/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Configures a hyperparameter tuning job.See Also:
AWS
* API Reference
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.
*/ inline const HyperParameterTuningJobStrategyType& GetStrategy() const{ return m_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.
*/ inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; } /** *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.
*/ inline void SetStrategy(const HyperParameterTuningJobStrategyType& value) { m_strategyHasBeenSet = true; m_strategy = value; } /** *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.
*/ inline void SetStrategy(HyperParameterTuningJobStrategyType&& value) { m_strategyHasBeenSet = true; m_strategy = std::move(value); } /** *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.
*/ inline HyperParameterTuningJobConfig& WithStrategy(const HyperParameterTuningJobStrategyType& value) { SetStrategy(value); return *this;} /** *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.
*/ inline HyperParameterTuningJobConfig& WithStrategy(HyperParameterTuningJobStrategyType&& value) { SetStrategy(std::move(value)); return *this;} /** *The configuration for the Hyperband
optimization strategy. This
* parameter should be provided only if Hyperband
is selected as the
* strategy for HyperParameterTuningJobConfig
.
The configuration for the Hyperband
optimization strategy. This
* parameter should be provided only if Hyperband
is selected as the
* strategy for HyperParameterTuningJobConfig
.
The configuration for the Hyperband
optimization strategy. This
* parameter should be provided only if Hyperband
is selected as the
* strategy for HyperParameterTuningJobConfig
.
The configuration for the Hyperband
optimization strategy. This
* parameter should be provided only if Hyperband
is selected as the
* strategy for HyperParameterTuningJobConfig
.
The configuration for the Hyperband
optimization strategy. This
* parameter should be provided only if Hyperband
is selected as the
* strategy for HyperParameterTuningJobConfig
.
The configuration for the Hyperband
optimization strategy. This
* parameter should be provided only if Hyperband
is selected as the
* strategy for HyperParameterTuningJobConfig
.
The HyperParameterTuningJobObjective * specifies the objective metric used to evaluate the performance of training jobs * launched by this tuning job.
*/ inline const HyperParameterTuningJobObjective& GetHyperParameterTuningJobObjective() const{ return m_hyperParameterTuningJobObjective; } /** *The HyperParameterTuningJobObjective * specifies the objective metric used to evaluate the performance of training jobs * launched by this tuning job.
*/ inline bool HyperParameterTuningJobObjectiveHasBeenSet() const { return m_hyperParameterTuningJobObjectiveHasBeenSet; } /** *The HyperParameterTuningJobObjective * specifies the objective metric used to evaluate the performance of training jobs * launched by this tuning job.
*/ inline void SetHyperParameterTuningJobObjective(const HyperParameterTuningJobObjective& value) { m_hyperParameterTuningJobObjectiveHasBeenSet = true; m_hyperParameterTuningJobObjective = value; } /** *The HyperParameterTuningJobObjective * specifies the objective metric used to evaluate the performance of training jobs * launched by this tuning job.
*/ inline void SetHyperParameterTuningJobObjective(HyperParameterTuningJobObjective&& value) { m_hyperParameterTuningJobObjectiveHasBeenSet = true; m_hyperParameterTuningJobObjective = std::move(value); } /** *The HyperParameterTuningJobObjective * specifies the objective metric used to evaluate the performance of training jobs * launched by this tuning job.
*/ inline HyperParameterTuningJobConfig& WithHyperParameterTuningJobObjective(const HyperParameterTuningJobObjective& value) { SetHyperParameterTuningJobObjective(value); return *this;} /** *The HyperParameterTuningJobObjective * specifies the objective metric used to evaluate the performance of training jobs * launched by this tuning job.
*/ inline HyperParameterTuningJobConfig& WithHyperParameterTuningJobObjective(HyperParameterTuningJobObjective&& value) { SetHyperParameterTuningJobObjective(std::move(value)); return *this;} /** *The ResourceLimits * object that specifies the maximum number of training and parallel training jobs * that can be used for this hyperparameter tuning job.
*/ inline const ResourceLimits& GetResourceLimits() const{ return m_resourceLimits; } /** *The ResourceLimits * object that specifies the maximum number of training and parallel training jobs * that can be used for this hyperparameter tuning job.
*/ inline bool ResourceLimitsHasBeenSet() const { return m_resourceLimitsHasBeenSet; } /** *The ResourceLimits * object that specifies the maximum number of training and parallel training jobs * that can be used for this hyperparameter tuning job.
*/ inline void SetResourceLimits(const ResourceLimits& value) { m_resourceLimitsHasBeenSet = true; m_resourceLimits = value; } /** *The ResourceLimits * object that specifies the maximum number of training and parallel training jobs * that can be used for this hyperparameter tuning job.
*/ inline void SetResourceLimits(ResourceLimits&& value) { m_resourceLimitsHasBeenSet = true; m_resourceLimits = std::move(value); } /** *The ResourceLimits * object that specifies the maximum number of training and parallel training jobs * that can be used for this hyperparameter tuning job.
*/ inline HyperParameterTuningJobConfig& WithResourceLimits(const ResourceLimits& value) { SetResourceLimits(value); return *this;} /** *The ResourceLimits * object that specifies the maximum number of training and parallel training jobs * that can be used for this hyperparameter tuning job.
*/ inline HyperParameterTuningJobConfig& WithResourceLimits(ResourceLimits&& value) { SetResourceLimits(std::move(value)); return *this;} /** *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.
*/ inline const ParameterRanges& GetParameterRanges() const{ return m_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.
*/ inline bool ParameterRangesHasBeenSet() const { return m_parameterRangesHasBeenSet; } /** *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.
*/ inline void SetParameterRanges(const ParameterRanges& value) { m_parameterRangesHasBeenSet = true; m_parameterRanges = value; } /** *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.
*/ inline void SetParameterRanges(ParameterRanges&& value) { m_parameterRangesHasBeenSet = true; m_parameterRanges = std::move(value); } /** *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.
*/ inline HyperParameterTuningJobConfig& WithParameterRanges(const ParameterRanges& value) { SetParameterRanges(value); return *this;} /** *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.
*/ inline HyperParameterTuningJobConfig& WithParameterRanges(ParameterRanges&& value) { SetParameterRanges(std::move(value)); return *this;} /** *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
):
Training * jobs launched by the hyperparameter tuning job do not use early stopping.
*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.
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
):
Training * jobs launched by the hyperparameter tuning job do not use early stopping.
*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.
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
):
Training * jobs launched by the hyperparameter tuning job do not use early stopping.
*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.
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
):
Training * jobs launched by the hyperparameter tuning job do not use early stopping.
*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.
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
):
Training * jobs launched by the hyperparameter tuning job do not use early stopping.
*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.
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
):
Training * jobs launched by the hyperparameter tuning job do not use early stopping.
*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.
The tuning job's completion criteria.
*/ inline const TuningJobCompletionCriteria& GetTuningJobCompletionCriteria() const{ return m_tuningJobCompletionCriteria; } /** *The tuning job's completion criteria.
*/ inline bool TuningJobCompletionCriteriaHasBeenSet() const { return m_tuningJobCompletionCriteriaHasBeenSet; } /** *The tuning job's completion criteria.
*/ inline void SetTuningJobCompletionCriteria(const TuningJobCompletionCriteria& value) { m_tuningJobCompletionCriteriaHasBeenSet = true; m_tuningJobCompletionCriteria = value; } /** *The tuning job's completion criteria.
*/ inline void SetTuningJobCompletionCriteria(TuningJobCompletionCriteria&& value) { m_tuningJobCompletionCriteriaHasBeenSet = true; m_tuningJobCompletionCriteria = std::move(value); } /** *The tuning job's completion criteria.
*/ inline HyperParameterTuningJobConfig& WithTuningJobCompletionCriteria(const TuningJobCompletionCriteria& value) { SetTuningJobCompletionCriteria(value); return *this;} /** *The tuning job's completion criteria.
*/ inline HyperParameterTuningJobConfig& WithTuningJobCompletionCriteria(TuningJobCompletionCriteria&& value) { SetTuningJobCompletionCriteria(std::move(value)); return *this;} /** *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.
*/ inline int GetRandomSeed() const{ return m_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.
*/ inline bool RandomSeedHasBeenSet() const { return m_randomSeedHasBeenSet; } /** *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.
*/ inline void SetRandomSeed(int value) { m_randomSeedHasBeenSet = true; m_randomSeed = value; } /** *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.
*/ inline HyperParameterTuningJobConfig& WithRandomSeed(int value) { SetRandomSeed(value); return *this;} private: HyperParameterTuningJobStrategyType m_strategy; bool m_strategyHasBeenSet = false; HyperParameterTuningJobStrategyConfig m_strategyConfig; bool m_strategyConfigHasBeenSet = false; HyperParameterTuningJobObjective m_hyperParameterTuningJobObjective; bool m_hyperParameterTuningJobObjectiveHasBeenSet = false; ResourceLimits m_resourceLimits; bool m_resourceLimitsHasBeenSet = false; ParameterRanges m_parameterRanges; bool m_parameterRangesHasBeenSet = false; TrainingJobEarlyStoppingType m_trainingJobEarlyStoppingType; bool m_trainingJobEarlyStoppingTypeHasBeenSet = false; TuningJobCompletionCriteria m_tuningJobCompletionCriteria; bool m_tuningJobCompletionCriteriaHasBeenSet = false; int m_randomSeed; bool m_randomSeedHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws