AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
HyperParameterTuningJobConfig.h
1
6#pragma once
7#include <aws/sagemaker/SageMaker_EXPORTS.h>
8#include <aws/sagemaker/model/HyperParameterTuningJobObjective.h>
9#include <aws/sagemaker/model/HyperParameterTuningJobStrategyConfig.h>
10#include <aws/sagemaker/model/HyperParameterTuningJobStrategyType.h>
11#include <aws/sagemaker/model/ParameterRanges.h>
12#include <aws/sagemaker/model/ResourceLimits.h>
13#include <aws/sagemaker/model/TrainingJobEarlyStoppingType.h>
14#include <aws/sagemaker/model/TuningJobCompletionCriteria.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace SageMaker {
26namespace Model {
27
34 public:
35 AWS_SAGEMAKER_API HyperParameterTuningJobConfig() = default;
38 AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
48 inline HyperParameterTuningJobStrategyType GetStrategy() const { return m_strategy; }
49 inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
51 m_strategyHasBeenSet = true;
52 m_strategy = value;
53 }
55 SetStrategy(value);
56 return *this;
57 }
59
61
66 inline const HyperParameterTuningJobStrategyConfig& GetStrategyConfig() const { return m_strategyConfig; }
67 inline bool StrategyConfigHasBeenSet() const { return m_strategyConfigHasBeenSet; }
68 template <typename StrategyConfigT = HyperParameterTuningJobStrategyConfig>
69 void SetStrategyConfig(StrategyConfigT&& value) {
70 m_strategyConfigHasBeenSet = true;
71 m_strategyConfig = std::forward<StrategyConfigT>(value);
72 }
73 template <typename StrategyConfigT = HyperParameterTuningJobStrategyConfig>
75 SetStrategyConfig(std::forward<StrategyConfigT>(value));
76 return *this;
77 }
79
81
87 inline const HyperParameterTuningJobObjective& GetHyperParameterTuningJobObjective() const { return m_hyperParameterTuningJobObjective; }
88 inline bool HyperParameterTuningJobObjectiveHasBeenSet() const { return m_hyperParameterTuningJobObjectiveHasBeenSet; }
89 template <typename HyperParameterTuningJobObjectiveT = HyperParameterTuningJobObjective>
90 void SetHyperParameterTuningJobObjective(HyperParameterTuningJobObjectiveT&& value) {
91 m_hyperParameterTuningJobObjectiveHasBeenSet = true;
92 m_hyperParameterTuningJobObjective = std::forward<HyperParameterTuningJobObjectiveT>(value);
93 }
94 template <typename HyperParameterTuningJobObjectiveT = HyperParameterTuningJobObjective>
95 HyperParameterTuningJobConfig& WithHyperParameterTuningJobObjective(HyperParameterTuningJobObjectiveT&& value) {
96 SetHyperParameterTuningJobObjective(std::forward<HyperParameterTuningJobObjectiveT>(value));
97 return *this;
98 }
100
102
108 inline const ResourceLimits& GetResourceLimits() const { return m_resourceLimits; }
109 inline bool ResourceLimitsHasBeenSet() const { return m_resourceLimitsHasBeenSet; }
110 template <typename ResourceLimitsT = ResourceLimits>
111 void SetResourceLimits(ResourceLimitsT&& value) {
112 m_resourceLimitsHasBeenSet = true;
113 m_resourceLimits = std::forward<ResourceLimitsT>(value);
114 }
115 template <typename ResourceLimitsT = ResourceLimits>
117 SetResourceLimits(std::forward<ResourceLimitsT>(value));
118 return *this;
119 }
121
123
130 inline const ParameterRanges& GetParameterRanges() const { return m_parameterRanges; }
131 inline bool ParameterRangesHasBeenSet() const { return m_parameterRangesHasBeenSet; }
132 template <typename ParameterRangesT = ParameterRanges>
133 void SetParameterRanges(ParameterRangesT&& value) {
134 m_parameterRangesHasBeenSet = true;
135 m_parameterRanges = std::forward<ParameterRangesT>(value);
136 }
137 template <typename ParameterRangesT = ParameterRanges>
139 SetParameterRanges(std::forward<ParameterRangesT>(value));
140 return *this;
141 }
143
145
159 inline TrainingJobEarlyStoppingType GetTrainingJobEarlyStoppingType() const { return m_trainingJobEarlyStoppingType; }
160 inline bool TrainingJobEarlyStoppingTypeHasBeenSet() const { return m_trainingJobEarlyStoppingTypeHasBeenSet; }
162 m_trainingJobEarlyStoppingTypeHasBeenSet = true;
163 m_trainingJobEarlyStoppingType = value;
164 }
167 return *this;
168 }
170
172
175 inline const TuningJobCompletionCriteria& GetTuningJobCompletionCriteria() const { return m_tuningJobCompletionCriteria; }
176 inline bool TuningJobCompletionCriteriaHasBeenSet() const { return m_tuningJobCompletionCriteriaHasBeenSet; }
177 template <typename TuningJobCompletionCriteriaT = TuningJobCompletionCriteria>
178 void SetTuningJobCompletionCriteria(TuningJobCompletionCriteriaT&& value) {
179 m_tuningJobCompletionCriteriaHasBeenSet = true;
180 m_tuningJobCompletionCriteria = std::forward<TuningJobCompletionCriteriaT>(value);
181 }
182 template <typename TuningJobCompletionCriteriaT = TuningJobCompletionCriteria>
183 HyperParameterTuningJobConfig& WithTuningJobCompletionCriteria(TuningJobCompletionCriteriaT&& value) {
184 SetTuningJobCompletionCriteria(std::forward<TuningJobCompletionCriteriaT>(value));
185 return *this;
186 }
188
190
196 inline int GetRandomSeed() const { return m_randomSeed; }
197 inline bool RandomSeedHasBeenSet() const { return m_randomSeedHasBeenSet; }
198 inline void SetRandomSeed(int value) {
199 m_randomSeedHasBeenSet = true;
200 m_randomSeed = value;
201 }
203 SetRandomSeed(value);
204 return *this;
205 }
207 private:
209
210 HyperParameterTuningJobStrategyConfig m_strategyConfig;
211
212 HyperParameterTuningJobObjective m_hyperParameterTuningJobObjective;
213
214 ResourceLimits m_resourceLimits;
215
216 ParameterRanges m_parameterRanges;
217
219
220 TuningJobCompletionCriteria m_tuningJobCompletionCriteria;
221
222 int m_randomSeed{0};
223 bool m_strategyHasBeenSet = false;
224 bool m_strategyConfigHasBeenSet = false;
225 bool m_hyperParameterTuningJobObjectiveHasBeenSet = false;
226 bool m_resourceLimitsHasBeenSet = false;
227 bool m_parameterRangesHasBeenSet = false;
228 bool m_trainingJobEarlyStoppingTypeHasBeenSet = false;
229 bool m_tuningJobCompletionCriteriaHasBeenSet = false;
230 bool m_randomSeedHasBeenSet = false;
231};
232
233} // namespace Model
234} // namespace SageMaker
235} // namespace Aws
HyperParameterTuningJobStrategyType GetStrategy() const
const HyperParameterTuningJobObjective & GetHyperParameterTuningJobObjective() const
HyperParameterTuningJobConfig & WithHyperParameterTuningJobObjective(HyperParameterTuningJobObjectiveT &&value)
AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetHyperParameterTuningJobObjective(HyperParameterTuningJobObjectiveT &&value)
void SetTuningJobCompletionCriteria(TuningJobCompletionCriteriaT &&value)
AWS_SAGEMAKER_API HyperParameterTuningJobConfig()=default
HyperParameterTuningJobConfig & WithResourceLimits(ResourceLimitsT &&value)
HyperParameterTuningJobConfig & WithTrainingJobEarlyStoppingType(TrainingJobEarlyStoppingType value)
void SetTrainingJobEarlyStoppingType(TrainingJobEarlyStoppingType value)
void SetStrategy(HyperParameterTuningJobStrategyType value)
AWS_SAGEMAKER_API HyperParameterTuningJobConfig(Aws::Utils::Json::JsonView jsonValue)
HyperParameterTuningJobConfig & WithTuningJobCompletionCriteria(TuningJobCompletionCriteriaT &&value)
const TuningJobCompletionCriteria & GetTuningJobCompletionCriteria() const
AWS_SAGEMAKER_API HyperParameterTuningJobConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
HyperParameterTuningJobConfig & WithStrategy(HyperParameterTuningJobStrategyType value)
const HyperParameterTuningJobStrategyConfig & GetStrategyConfig() const
HyperParameterTuningJobConfig & WithStrategyConfig(StrategyConfigT &&value)
HyperParameterTuningJobConfig & WithParameterRanges(ParameterRangesT &&value)
Aws::Utils::Json::JsonValue JsonValue