AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
HyperParameterTrainingJobDefinition.h
1
6#pragma once
7#include <aws/sagemaker/SageMaker_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/sagemaker/model/HyperParameterTuningJobObjective.h>
10#include <aws/sagemaker/model/ParameterRanges.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/sagemaker/model/HyperParameterAlgorithmSpecification.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/sagemaker/model/VpcConfig.h>
15#include <aws/sagemaker/model/OutputDataConfig.h>
16#include <aws/sagemaker/model/ResourceConfig.h>
17#include <aws/sagemaker/model/HyperParameterTuningResourceConfig.h>
18#include <aws/sagemaker/model/StoppingCondition.h>
19#include <aws/sagemaker/model/CheckpointConfig.h>
20#include <aws/sagemaker/model/RetryStrategy.h>
21#include <aws/sagemaker/model/Channel.h>
22#include <utility>
23
24namespace Aws
25{
26namespace Utils
27{
28namespace Json
29{
30 class JsonValue;
31 class JsonView;
32} // namespace Json
33} // namespace Utils
34namespace SageMaker
35{
36namespace Model
37{
38
46 {
47 public:
48 AWS_SAGEMAKER_API HyperParameterTrainingJobDefinition() = default;
51 AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const;
52
53
55
58 inline const Aws::String& GetDefinitionName() const { return m_definitionName; }
59 inline bool DefinitionNameHasBeenSet() const { return m_definitionNameHasBeenSet; }
60 template<typename DefinitionNameT = Aws::String>
61 void SetDefinitionName(DefinitionNameT&& value) { m_definitionNameHasBeenSet = true; m_definitionName = std::forward<DefinitionNameT>(value); }
62 template<typename DefinitionNameT = Aws::String>
63 HyperParameterTrainingJobDefinition& WithDefinitionName(DefinitionNameT&& value) { SetDefinitionName(std::forward<DefinitionNameT>(value)); return *this;}
65
67
68 inline const HyperParameterTuningJobObjective& GetTuningObjective() const { return m_tuningObjective; }
69 inline bool TuningObjectiveHasBeenSet() const { return m_tuningObjectiveHasBeenSet; }
70 template<typename TuningObjectiveT = HyperParameterTuningJobObjective>
71 void SetTuningObjective(TuningObjectiveT&& value) { m_tuningObjectiveHasBeenSet = true; m_tuningObjective = std::forward<TuningObjectiveT>(value); }
72 template<typename TuningObjectiveT = HyperParameterTuningJobObjective>
73 HyperParameterTrainingJobDefinition& WithTuningObjective(TuningObjectiveT&& value) { SetTuningObjective(std::forward<TuningObjectiveT>(value)); return *this;}
75
77
78 inline const ParameterRanges& GetHyperParameterRanges() const { return m_hyperParameterRanges; }
79 inline bool HyperParameterRangesHasBeenSet() const { return m_hyperParameterRangesHasBeenSet; }
80 template<typename HyperParameterRangesT = ParameterRanges>
81 void SetHyperParameterRanges(HyperParameterRangesT&& value) { m_hyperParameterRangesHasBeenSet = true; m_hyperParameterRanges = std::forward<HyperParameterRangesT>(value); }
82 template<typename HyperParameterRangesT = ParameterRanges>
83 HyperParameterTrainingJobDefinition& WithHyperParameterRanges(HyperParameterRangesT&& value) { SetHyperParameterRanges(std::forward<HyperParameterRangesT>(value)); return *this;}
85
87
91 inline const Aws::Map<Aws::String, Aws::String>& GetStaticHyperParameters() const { return m_staticHyperParameters; }
92 inline bool StaticHyperParametersHasBeenSet() const { return m_staticHyperParametersHasBeenSet; }
93 template<typename StaticHyperParametersT = Aws::Map<Aws::String, Aws::String>>
94 void SetStaticHyperParameters(StaticHyperParametersT&& value) { m_staticHyperParametersHasBeenSet = true; m_staticHyperParameters = std::forward<StaticHyperParametersT>(value); }
95 template<typename StaticHyperParametersT = Aws::Map<Aws::String, Aws::String>>
96 HyperParameterTrainingJobDefinition& WithStaticHyperParameters(StaticHyperParametersT&& value) { SetStaticHyperParameters(std::forward<StaticHyperParametersT>(value)); return *this;}
97 template<typename StaticHyperParametersKeyT = Aws::String, typename StaticHyperParametersValueT = Aws::String>
98 HyperParameterTrainingJobDefinition& AddStaticHyperParameters(StaticHyperParametersKeyT&& key, StaticHyperParametersValueT&& value) {
99 m_staticHyperParametersHasBeenSet = true; m_staticHyperParameters.emplace(std::forward<StaticHyperParametersKeyT>(key), std::forward<StaticHyperParametersValueT>(value)); return *this;
100 }
102
104
110 inline const HyperParameterAlgorithmSpecification& GetAlgorithmSpecification() const { return m_algorithmSpecification; }
111 inline bool AlgorithmSpecificationHasBeenSet() const { return m_algorithmSpecificationHasBeenSet; }
112 template<typename AlgorithmSpecificationT = HyperParameterAlgorithmSpecification>
113 void SetAlgorithmSpecification(AlgorithmSpecificationT&& value) { m_algorithmSpecificationHasBeenSet = true; m_algorithmSpecification = std::forward<AlgorithmSpecificationT>(value); }
114 template<typename AlgorithmSpecificationT = HyperParameterAlgorithmSpecification>
115 HyperParameterTrainingJobDefinition& WithAlgorithmSpecification(AlgorithmSpecificationT&& value) { SetAlgorithmSpecification(std::forward<AlgorithmSpecificationT>(value)); return *this;}
117
119
123 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
124 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
125 template<typename RoleArnT = Aws::String>
126 void SetRoleArn(RoleArnT&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::forward<RoleArnT>(value); }
127 template<typename RoleArnT = Aws::String>
128 HyperParameterTrainingJobDefinition& WithRoleArn(RoleArnT&& value) { SetRoleArn(std::forward<RoleArnT>(value)); return *this;}
130
132
138 inline const Aws::Vector<Channel>& GetInputDataConfig() const { return m_inputDataConfig; }
139 inline bool InputDataConfigHasBeenSet() const { return m_inputDataConfigHasBeenSet; }
140 template<typename InputDataConfigT = Aws::Vector<Channel>>
141 void SetInputDataConfig(InputDataConfigT&& value) { m_inputDataConfigHasBeenSet = true; m_inputDataConfig = std::forward<InputDataConfigT>(value); }
142 template<typename InputDataConfigT = Aws::Vector<Channel>>
143 HyperParameterTrainingJobDefinition& WithInputDataConfig(InputDataConfigT&& value) { SetInputDataConfig(std::forward<InputDataConfigT>(value)); return *this;}
144 template<typename InputDataConfigT = Channel>
145 HyperParameterTrainingJobDefinition& AddInputDataConfig(InputDataConfigT&& value) { m_inputDataConfigHasBeenSet = true; m_inputDataConfig.emplace_back(std::forward<InputDataConfigT>(value)); return *this; }
147
149
158 inline const VpcConfig& GetVpcConfig() const { return m_vpcConfig; }
159 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
160 template<typename VpcConfigT = VpcConfig>
161 void SetVpcConfig(VpcConfigT&& value) { m_vpcConfigHasBeenSet = true; m_vpcConfig = std::forward<VpcConfigT>(value); }
162 template<typename VpcConfigT = VpcConfig>
163 HyperParameterTrainingJobDefinition& WithVpcConfig(VpcConfigT&& value) { SetVpcConfig(std::forward<VpcConfigT>(value)); return *this;}
165
167
171 inline const OutputDataConfig& GetOutputDataConfig() const { return m_outputDataConfig; }
172 inline bool OutputDataConfigHasBeenSet() const { return m_outputDataConfigHasBeenSet; }
173 template<typename OutputDataConfigT = OutputDataConfig>
174 void SetOutputDataConfig(OutputDataConfigT&& value) { m_outputDataConfigHasBeenSet = true; m_outputDataConfig = std::forward<OutputDataConfigT>(value); }
175 template<typename OutputDataConfigT = OutputDataConfig>
176 HyperParameterTrainingJobDefinition& WithOutputDataConfig(OutputDataConfigT&& value) { SetOutputDataConfig(std::forward<OutputDataConfigT>(value)); return *this;}
178
180
191 inline const ResourceConfig& GetResourceConfig() const { return m_resourceConfig; }
192 inline bool ResourceConfigHasBeenSet() const { return m_resourceConfigHasBeenSet; }
193 template<typename ResourceConfigT = ResourceConfig>
194 void SetResourceConfig(ResourceConfigT&& value) { m_resourceConfigHasBeenSet = true; m_resourceConfig = std::forward<ResourceConfigT>(value); }
195 template<typename ResourceConfigT = ResourceConfig>
196 HyperParameterTrainingJobDefinition& WithResourceConfig(ResourceConfigT&& value) { SetResourceConfig(std::forward<ResourceConfigT>(value)); return *this;}
198
200
208 inline const HyperParameterTuningResourceConfig& GetHyperParameterTuningResourceConfig() const { return m_hyperParameterTuningResourceConfig; }
209 inline bool HyperParameterTuningResourceConfigHasBeenSet() const { return m_hyperParameterTuningResourceConfigHasBeenSet; }
210 template<typename HyperParameterTuningResourceConfigT = HyperParameterTuningResourceConfig>
211 void SetHyperParameterTuningResourceConfig(HyperParameterTuningResourceConfigT&& value) { m_hyperParameterTuningResourceConfigHasBeenSet = true; m_hyperParameterTuningResourceConfig = std::forward<HyperParameterTuningResourceConfigT>(value); }
212 template<typename HyperParameterTuningResourceConfigT = HyperParameterTuningResourceConfig>
213 HyperParameterTrainingJobDefinition& WithHyperParameterTuningResourceConfig(HyperParameterTuningResourceConfigT&& value) { SetHyperParameterTuningResourceConfig(std::forward<HyperParameterTuningResourceConfigT>(value)); return *this;}
215
217
223 inline const StoppingCondition& GetStoppingCondition() const { return m_stoppingCondition; }
224 inline bool StoppingConditionHasBeenSet() const { return m_stoppingConditionHasBeenSet; }
225 template<typename StoppingConditionT = StoppingCondition>
226 void SetStoppingCondition(StoppingConditionT&& value) { m_stoppingConditionHasBeenSet = true; m_stoppingCondition = std::forward<StoppingConditionT>(value); }
227 template<typename StoppingConditionT = StoppingCondition>
228 HyperParameterTrainingJobDefinition& WithStoppingCondition(StoppingConditionT&& value) { SetStoppingCondition(std::forward<StoppingConditionT>(value)); return *this;}
230
232
240 inline bool GetEnableNetworkIsolation() const { return m_enableNetworkIsolation; }
241 inline bool EnableNetworkIsolationHasBeenSet() const { return m_enableNetworkIsolationHasBeenSet; }
242 inline void SetEnableNetworkIsolation(bool value) { m_enableNetworkIsolationHasBeenSet = true; m_enableNetworkIsolation = value; }
245
247
254 inline bool GetEnableInterContainerTrafficEncryption() const { return m_enableInterContainerTrafficEncryption; }
255 inline bool EnableInterContainerTrafficEncryptionHasBeenSet() const { return m_enableInterContainerTrafficEncryptionHasBeenSet; }
256 inline void SetEnableInterContainerTrafficEncryption(bool value) { m_enableInterContainerTrafficEncryptionHasBeenSet = true; m_enableInterContainerTrafficEncryption = value; }
259
261
265 inline bool GetEnableManagedSpotTraining() const { return m_enableManagedSpotTraining; }
266 inline bool EnableManagedSpotTrainingHasBeenSet() const { return m_enableManagedSpotTrainingHasBeenSet; }
267 inline void SetEnableManagedSpotTraining(bool value) { m_enableManagedSpotTrainingHasBeenSet = true; m_enableManagedSpotTraining = value; }
270
272
273 inline const CheckpointConfig& GetCheckpointConfig() const { return m_checkpointConfig; }
274 inline bool CheckpointConfigHasBeenSet() const { return m_checkpointConfigHasBeenSet; }
275 template<typename CheckpointConfigT = CheckpointConfig>
276 void SetCheckpointConfig(CheckpointConfigT&& value) { m_checkpointConfigHasBeenSet = true; m_checkpointConfig = std::forward<CheckpointConfigT>(value); }
277 template<typename CheckpointConfigT = CheckpointConfig>
278 HyperParameterTrainingJobDefinition& WithCheckpointConfig(CheckpointConfigT&& value) { SetCheckpointConfig(std::forward<CheckpointConfigT>(value)); return *this;}
280
282
286 inline const RetryStrategy& GetRetryStrategy() const { return m_retryStrategy; }
287 inline bool RetryStrategyHasBeenSet() const { return m_retryStrategyHasBeenSet; }
288 template<typename RetryStrategyT = RetryStrategy>
289 void SetRetryStrategy(RetryStrategyT&& value) { m_retryStrategyHasBeenSet = true; m_retryStrategy = std::forward<RetryStrategyT>(value); }
290 template<typename RetryStrategyT = RetryStrategy>
291 HyperParameterTrainingJobDefinition& WithRetryStrategy(RetryStrategyT&& value) { SetRetryStrategy(std::forward<RetryStrategyT>(value)); return *this;}
293
295
309 inline const Aws::Map<Aws::String, Aws::String>& GetEnvironment() const { return m_environment; }
310 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
311 template<typename EnvironmentT = Aws::Map<Aws::String, Aws::String>>
312 void SetEnvironment(EnvironmentT&& value) { m_environmentHasBeenSet = true; m_environment = std::forward<EnvironmentT>(value); }
313 template<typename EnvironmentT = Aws::Map<Aws::String, Aws::String>>
314 HyperParameterTrainingJobDefinition& WithEnvironment(EnvironmentT&& value) { SetEnvironment(std::forward<EnvironmentT>(value)); return *this;}
315 template<typename EnvironmentKeyT = Aws::String, typename EnvironmentValueT = Aws::String>
316 HyperParameterTrainingJobDefinition& AddEnvironment(EnvironmentKeyT&& key, EnvironmentValueT&& value) {
317 m_environmentHasBeenSet = true; m_environment.emplace(std::forward<EnvironmentKeyT>(key), std::forward<EnvironmentValueT>(value)); return *this;
318 }
320 private:
321
322 Aws::String m_definitionName;
323 bool m_definitionNameHasBeenSet = false;
324
325 HyperParameterTuningJobObjective m_tuningObjective;
326 bool m_tuningObjectiveHasBeenSet = false;
327
328 ParameterRanges m_hyperParameterRanges;
329 bool m_hyperParameterRangesHasBeenSet = false;
330
331 Aws::Map<Aws::String, Aws::String> m_staticHyperParameters;
332 bool m_staticHyperParametersHasBeenSet = false;
333
334 HyperParameterAlgorithmSpecification m_algorithmSpecification;
335 bool m_algorithmSpecificationHasBeenSet = false;
336
337 Aws::String m_roleArn;
338 bool m_roleArnHasBeenSet = false;
339
340 Aws::Vector<Channel> m_inputDataConfig;
341 bool m_inputDataConfigHasBeenSet = false;
342
343 VpcConfig m_vpcConfig;
344 bool m_vpcConfigHasBeenSet = false;
345
346 OutputDataConfig m_outputDataConfig;
347 bool m_outputDataConfigHasBeenSet = false;
348
349 ResourceConfig m_resourceConfig;
350 bool m_resourceConfigHasBeenSet = false;
351
352 HyperParameterTuningResourceConfig m_hyperParameterTuningResourceConfig;
353 bool m_hyperParameterTuningResourceConfigHasBeenSet = false;
354
355 StoppingCondition m_stoppingCondition;
356 bool m_stoppingConditionHasBeenSet = false;
357
358 bool m_enableNetworkIsolation{false};
359 bool m_enableNetworkIsolationHasBeenSet = false;
360
361 bool m_enableInterContainerTrafficEncryption{false};
362 bool m_enableInterContainerTrafficEncryptionHasBeenSet = false;
363
364 bool m_enableManagedSpotTraining{false};
365 bool m_enableManagedSpotTrainingHasBeenSet = false;
366
367 CheckpointConfig m_checkpointConfig;
368 bool m_checkpointConfigHasBeenSet = false;
369
370 RetryStrategy m_retryStrategy;
371 bool m_retryStrategyHasBeenSet = false;
372
374 bool m_environmentHasBeenSet = false;
375 };
376
377} // namespace Model
378} // namespace SageMaker
379} // namespace Aws
HyperParameterTrainingJobDefinition & WithCheckpointConfig(CheckpointConfigT &&value)
HyperParameterTrainingJobDefinition & WithHyperParameterRanges(HyperParameterRangesT &&value)
HyperParameterTrainingJobDefinition & WithStaticHyperParameters(StaticHyperParametersT &&value)
const Aws::Map< Aws::String, Aws::String > & GetEnvironment() const
void SetHyperParameterTuningResourceConfig(HyperParameterTuningResourceConfigT &&value)
AWS_SAGEMAKER_API HyperParameterTrainingJobDefinition & operator=(Aws::Utils::Json::JsonView jsonValue)
HyperParameterTrainingJobDefinition & WithEnableNetworkIsolation(bool value)
HyperParameterTrainingJobDefinition & WithEnableInterContainerTrafficEncryption(bool value)
HyperParameterTrainingJobDefinition & WithDefinitionName(DefinitionNameT &&value)
const HyperParameterAlgorithmSpecification & GetAlgorithmSpecification() const
HyperParameterTrainingJobDefinition & WithRoleArn(RoleArnT &&value)
HyperParameterTrainingJobDefinition & WithStoppingCondition(StoppingConditionT &&value)
HyperParameterTrainingJobDefinition & WithRetryStrategy(RetryStrategyT &&value)
AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const
HyperParameterTrainingJobDefinition & WithEnableManagedSpotTraining(bool value)
HyperParameterTrainingJobDefinition & WithTuningObjective(TuningObjectiveT &&value)
const HyperParameterTuningResourceConfig & GetHyperParameterTuningResourceConfig() const
HyperParameterTrainingJobDefinition & AddEnvironment(EnvironmentKeyT &&key, EnvironmentValueT &&value)
HyperParameterTrainingJobDefinition & WithInputDataConfig(InputDataConfigT &&value)
HyperParameterTrainingJobDefinition & WithEnvironment(EnvironmentT &&value)
AWS_SAGEMAKER_API HyperParameterTrainingJobDefinition(Aws::Utils::Json::JsonView jsonValue)
HyperParameterTrainingJobDefinition & WithResourceConfig(ResourceConfigT &&value)
HyperParameterTrainingJobDefinition & WithHyperParameterTuningResourceConfig(HyperParameterTuningResourceConfigT &&value)
HyperParameterTrainingJobDefinition & WithVpcConfig(VpcConfigT &&value)
HyperParameterTrainingJobDefinition & WithOutputDataConfig(OutputDataConfigT &&value)
const Aws::Map< Aws::String, Aws::String > & GetStaticHyperParameters() const
HyperParameterTrainingJobDefinition & AddStaticHyperParameters(StaticHyperParametersKeyT &&key, StaticHyperParametersValueT &&value)
HyperParameterTrainingJobDefinition & WithAlgorithmSpecification(AlgorithmSpecificationT &&value)
HyperParameterTrainingJobDefinition & AddInputDataConfig(InputDataConfigT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue