/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** *

The configuration for Hyperband, a multi-fidelity based * hyperparameter tuning strategy. Hyperband uses the final and * intermediate results of a training job to dynamically allocate resources to * utilized hyperparameter configurations while automatically stopping * under-performing configurations. This parameter should be provided only if * Hyperband is selected as the StrategyConfig under the * HyperParameterTuningJobConfig API.

See Also:

AWS * API Reference

*/ class HyperbandStrategyConfig { public: AWS_SAGEMAKER_API HyperbandStrategyConfig(); AWS_SAGEMAKER_API HyperbandStrategyConfig(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API HyperbandStrategyConfig& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The minimum number of resources (such as epochs) that can be used by a * training job launched by a hyperparameter tuning job. If the value for * MinResource has not been reached, the training job is not stopped * by Hyperband.

*/ inline int GetMinResource() const{ return m_minResource; } /** *

The minimum number of resources (such as epochs) that can be used by a * training job launched by a hyperparameter tuning job. If the value for * MinResource has not been reached, the training job is not stopped * by Hyperband.

*/ inline bool MinResourceHasBeenSet() const { return m_minResourceHasBeenSet; } /** *

The minimum number of resources (such as epochs) that can be used by a * training job launched by a hyperparameter tuning job. If the value for * MinResource has not been reached, the training job is not stopped * by Hyperband.

*/ inline void SetMinResource(int value) { m_minResourceHasBeenSet = true; m_minResource = value; } /** *

The minimum number of resources (such as epochs) that can be used by a * training job launched by a hyperparameter tuning job. If the value for * MinResource has not been reached, the training job is not stopped * by Hyperband.

*/ inline HyperbandStrategyConfig& WithMinResource(int value) { SetMinResource(value); return *this;} /** *

The maximum number of resources (such as epochs) that can be used by a * training job launched by a hyperparameter tuning job. Once a job reaches the * MaxResource value, it is stopped. If a value for * MaxResource is not provided, and Hyperband is selected * as the hyperparameter tuning strategy, HyperbandTrainingJ attempts * to infer MaxResource from the following keys (if present) in StaticsHyperParameters:

*

If HyperbandStrategyConfig is unable to infer a value for * MaxResource, it generates a validation error. The maximum value is * 20,000 epochs. All metrics that correspond to an objective metric are used to * derive early * stopping decisions. For distributive * training jobs, ensure that duplicate metrics are not printed in the logs across * the individual nodes in a training job. If multiple nodes are publishing * duplicate or incorrect metrics, training jobs may make an incorrect stopping * decision and stop the job prematurely.

*/ inline int GetMaxResource() const{ return m_maxResource; } /** *

The maximum number of resources (such as epochs) that can be used by a * training job launched by a hyperparameter tuning job. Once a job reaches the * MaxResource value, it is stopped. If a value for * MaxResource is not provided, and Hyperband is selected * as the hyperparameter tuning strategy, HyperbandTrainingJ attempts * to infer MaxResource from the following keys (if present) in StaticsHyperParameters:

*

If HyperbandStrategyConfig is unable to infer a value for * MaxResource, it generates a validation error. The maximum value is * 20,000 epochs. All metrics that correspond to an objective metric are used to * derive early * stopping decisions. For distributive * training jobs, ensure that duplicate metrics are not printed in the logs across * the individual nodes in a training job. If multiple nodes are publishing * duplicate or incorrect metrics, training jobs may make an incorrect stopping * decision and stop the job prematurely.

*/ inline bool MaxResourceHasBeenSet() const { return m_maxResourceHasBeenSet; } /** *

The maximum number of resources (such as epochs) that can be used by a * training job launched by a hyperparameter tuning job. Once a job reaches the * MaxResource value, it is stopped. If a value for * MaxResource is not provided, and Hyperband is selected * as the hyperparameter tuning strategy, HyperbandTrainingJ attempts * to infer MaxResource from the following keys (if present) in StaticsHyperParameters:

*

If HyperbandStrategyConfig is unable to infer a value for * MaxResource, it generates a validation error. The maximum value is * 20,000 epochs. All metrics that correspond to an objective metric are used to * derive early * stopping decisions. For distributive * training jobs, ensure that duplicate metrics are not printed in the logs across * the individual nodes in a training job. If multiple nodes are publishing * duplicate or incorrect metrics, training jobs may make an incorrect stopping * decision and stop the job prematurely.

*/ inline void SetMaxResource(int value) { m_maxResourceHasBeenSet = true; m_maxResource = value; } /** *

The maximum number of resources (such as epochs) that can be used by a * training job launched by a hyperparameter tuning job. Once a job reaches the * MaxResource value, it is stopped. If a value for * MaxResource is not provided, and Hyperband is selected * as the hyperparameter tuning strategy, HyperbandTrainingJ attempts * to infer MaxResource from the following keys (if present) in StaticsHyperParameters:

*

If HyperbandStrategyConfig is unable to infer a value for * MaxResource, it generates a validation error. The maximum value is * 20,000 epochs. All metrics that correspond to an objective metric are used to * derive early * stopping decisions. For distributive * training jobs, ensure that duplicate metrics are not printed in the logs across * the individual nodes in a training job. If multiple nodes are publishing * duplicate or incorrect metrics, training jobs may make an incorrect stopping * decision and stop the job prematurely.

*/ inline HyperbandStrategyConfig& WithMaxResource(int value) { SetMaxResource(value); return *this;} private: int m_minResource; bool m_minResourceHasBeenSet = false; int m_maxResource; bool m_maxResourceHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws