AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
HyperParameterTrainingJobDefinition.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/sagemaker/SageMaker_EXPORTS.h>
11#include <aws/sagemaker/model/Channel.h>
12#include <aws/sagemaker/model/CheckpointConfig.h>
13#include <aws/sagemaker/model/HyperParameterAlgorithmSpecification.h>
14#include <aws/sagemaker/model/HyperParameterTuningJobObjective.h>
15#include <aws/sagemaker/model/HyperParameterTuningResourceConfig.h>
16#include <aws/sagemaker/model/OutputDataConfig.h>
17#include <aws/sagemaker/model/ParameterRanges.h>
18#include <aws/sagemaker/model/ResourceConfig.h>
19#include <aws/sagemaker/model/RetryStrategy.h>
20#include <aws/sagemaker/model/StoppingCondition.h>
21#include <aws/sagemaker/model/VpcConfig.h>
22
23#include <utility>
24
25namespace Aws {
26namespace Utils {
27namespace Json {
28class JsonValue;
29class JsonView;
30} // namespace Json
31} // namespace Utils
32namespace SageMaker {
33namespace Model {
34
42 public:
43 AWS_SAGEMAKER_API HyperParameterTrainingJobDefinition() = default;
46 AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const;
47
49
52 inline const Aws::String& GetDefinitionName() const { return m_definitionName; }
53 inline bool DefinitionNameHasBeenSet() const { return m_definitionNameHasBeenSet; }
54 template <typename DefinitionNameT = Aws::String>
55 void SetDefinitionName(DefinitionNameT&& value) {
56 m_definitionNameHasBeenSet = true;
57 m_definitionName = std::forward<DefinitionNameT>(value);
58 }
59 template <typename DefinitionNameT = Aws::String>
61 SetDefinitionName(std::forward<DefinitionNameT>(value));
62 return *this;
63 }
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) {
72 m_tuningObjectiveHasBeenSet = true;
73 m_tuningObjective = std::forward<TuningObjectiveT>(value);
74 }
75 template <typename TuningObjectiveT = HyperParameterTuningJobObjective>
77 SetTuningObjective(std::forward<TuningObjectiveT>(value));
78 return *this;
79 }
81
83
84 inline const ParameterRanges& GetHyperParameterRanges() const { return m_hyperParameterRanges; }
85 inline bool HyperParameterRangesHasBeenSet() const { return m_hyperParameterRangesHasBeenSet; }
86 template <typename HyperParameterRangesT = ParameterRanges>
87 void SetHyperParameterRanges(HyperParameterRangesT&& value) {
88 m_hyperParameterRangesHasBeenSet = true;
89 m_hyperParameterRanges = std::forward<HyperParameterRangesT>(value);
90 }
91 template <typename HyperParameterRangesT = ParameterRanges>
93 SetHyperParameterRanges(std::forward<HyperParameterRangesT>(value));
94 return *this;
95 }
97
99
103 inline const Aws::Map<Aws::String, Aws::String>& GetStaticHyperParameters() const { return m_staticHyperParameters; }
104 inline bool StaticHyperParametersHasBeenSet() const { return m_staticHyperParametersHasBeenSet; }
105 template <typename StaticHyperParametersT = Aws::Map<Aws::String, Aws::String>>
106 void SetStaticHyperParameters(StaticHyperParametersT&& value) {
107 m_staticHyperParametersHasBeenSet = true;
108 m_staticHyperParameters = std::forward<StaticHyperParametersT>(value);
109 }
110 template <typename StaticHyperParametersT = Aws::Map<Aws::String, Aws::String>>
112 SetStaticHyperParameters(std::forward<StaticHyperParametersT>(value));
113 return *this;
114 }
115 template <typename StaticHyperParametersKeyT = Aws::String, typename StaticHyperParametersValueT = Aws::String>
116 HyperParameterTrainingJobDefinition& AddStaticHyperParameters(StaticHyperParametersKeyT&& key, StaticHyperParametersValueT&& value) {
117 m_staticHyperParametersHasBeenSet = true;
118 m_staticHyperParameters.emplace(std::forward<StaticHyperParametersKeyT>(key), std::forward<StaticHyperParametersValueT>(value));
119 return *this;
120 }
122
124
130 inline const HyperParameterAlgorithmSpecification& GetAlgorithmSpecification() const { return m_algorithmSpecification; }
131 inline bool AlgorithmSpecificationHasBeenSet() const { return m_algorithmSpecificationHasBeenSet; }
132 template <typename AlgorithmSpecificationT = HyperParameterAlgorithmSpecification>
133 void SetAlgorithmSpecification(AlgorithmSpecificationT&& value) {
134 m_algorithmSpecificationHasBeenSet = true;
135 m_algorithmSpecification = std::forward<AlgorithmSpecificationT>(value);
136 }
137 template <typename AlgorithmSpecificationT = HyperParameterAlgorithmSpecification>
139 SetAlgorithmSpecification(std::forward<AlgorithmSpecificationT>(value));
140 return *this;
141 }
143
145
149 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
150 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
151 template <typename RoleArnT = Aws::String>
152 void SetRoleArn(RoleArnT&& value) {
153 m_roleArnHasBeenSet = true;
154 m_roleArn = std::forward<RoleArnT>(value);
155 }
156 template <typename RoleArnT = Aws::String>
158 SetRoleArn(std::forward<RoleArnT>(value));
159 return *this;
160 }
162
164
170 inline const Aws::Vector<Channel>& GetInputDataConfig() const { return m_inputDataConfig; }
171 inline bool InputDataConfigHasBeenSet() const { return m_inputDataConfigHasBeenSet; }
172 template <typename InputDataConfigT = Aws::Vector<Channel>>
173 void SetInputDataConfig(InputDataConfigT&& value) {
174 m_inputDataConfigHasBeenSet = true;
175 m_inputDataConfig = std::forward<InputDataConfigT>(value);
176 }
177 template <typename InputDataConfigT = Aws::Vector<Channel>>
179 SetInputDataConfig(std::forward<InputDataConfigT>(value));
180 return *this;
181 }
182 template <typename InputDataConfigT = Channel>
184 m_inputDataConfigHasBeenSet = true;
185 m_inputDataConfig.emplace_back(std::forward<InputDataConfigT>(value));
186 return *this;
187 }
189
191
200 inline const VpcConfig& GetVpcConfig() const { return m_vpcConfig; }
201 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
202 template <typename VpcConfigT = VpcConfig>
203 void SetVpcConfig(VpcConfigT&& value) {
204 m_vpcConfigHasBeenSet = true;
205 m_vpcConfig = std::forward<VpcConfigT>(value);
206 }
207 template <typename VpcConfigT = VpcConfig>
209 SetVpcConfig(std::forward<VpcConfigT>(value));
210 return *this;
211 }
213
215
219 inline const OutputDataConfig& GetOutputDataConfig() const { return m_outputDataConfig; }
220 inline bool OutputDataConfigHasBeenSet() const { return m_outputDataConfigHasBeenSet; }
221 template <typename OutputDataConfigT = OutputDataConfig>
222 void SetOutputDataConfig(OutputDataConfigT&& value) {
223 m_outputDataConfigHasBeenSet = true;
224 m_outputDataConfig = std::forward<OutputDataConfigT>(value);
225 }
226 template <typename OutputDataConfigT = OutputDataConfig>
228 SetOutputDataConfig(std::forward<OutputDataConfigT>(value));
229 return *this;
230 }
232
234
245 inline const ResourceConfig& GetResourceConfig() const { return m_resourceConfig; }
246 inline bool ResourceConfigHasBeenSet() const { return m_resourceConfigHasBeenSet; }
247 template <typename ResourceConfigT = ResourceConfig>
248 void SetResourceConfig(ResourceConfigT&& value) {
249 m_resourceConfigHasBeenSet = true;
250 m_resourceConfig = std::forward<ResourceConfigT>(value);
251 }
252 template <typename ResourceConfigT = ResourceConfig>
254 SetResourceConfig(std::forward<ResourceConfigT>(value));
255 return *this;
256 }
258
260
269 return m_hyperParameterTuningResourceConfig;
270 }
271 inline bool HyperParameterTuningResourceConfigHasBeenSet() const { return m_hyperParameterTuningResourceConfigHasBeenSet; }
272 template <typename HyperParameterTuningResourceConfigT = HyperParameterTuningResourceConfig>
273 void SetHyperParameterTuningResourceConfig(HyperParameterTuningResourceConfigT&& value) {
274 m_hyperParameterTuningResourceConfigHasBeenSet = true;
275 m_hyperParameterTuningResourceConfig = std::forward<HyperParameterTuningResourceConfigT>(value);
276 }
277 template <typename HyperParameterTuningResourceConfigT = HyperParameterTuningResourceConfig>
279 SetHyperParameterTuningResourceConfig(std::forward<HyperParameterTuningResourceConfigT>(value));
280 return *this;
281 }
283
285
291 inline const StoppingCondition& GetStoppingCondition() const { return m_stoppingCondition; }
292 inline bool StoppingConditionHasBeenSet() const { return m_stoppingConditionHasBeenSet; }
293 template <typename StoppingConditionT = StoppingCondition>
294 void SetStoppingCondition(StoppingConditionT&& value) {
295 m_stoppingConditionHasBeenSet = true;
296 m_stoppingCondition = std::forward<StoppingConditionT>(value);
297 }
298 template <typename StoppingConditionT = StoppingCondition>
300 SetStoppingCondition(std::forward<StoppingConditionT>(value));
301 return *this;
302 }
304
306
314 inline bool GetEnableNetworkIsolation() const { return m_enableNetworkIsolation; }
315 inline bool EnableNetworkIsolationHasBeenSet() const { return m_enableNetworkIsolationHasBeenSet; }
316 inline void SetEnableNetworkIsolation(bool value) {
317 m_enableNetworkIsolationHasBeenSet = true;
318 m_enableNetworkIsolation = value;
319 }
322 return *this;
323 }
325
327
334 inline bool GetEnableInterContainerTrafficEncryption() const { return m_enableInterContainerTrafficEncryption; }
335 inline bool EnableInterContainerTrafficEncryptionHasBeenSet() const { return m_enableInterContainerTrafficEncryptionHasBeenSet; }
337 m_enableInterContainerTrafficEncryptionHasBeenSet = true;
338 m_enableInterContainerTrafficEncryption = value;
339 }
342 return *this;
343 }
345
347
351 inline bool GetEnableManagedSpotTraining() const { return m_enableManagedSpotTraining; }
352 inline bool EnableManagedSpotTrainingHasBeenSet() const { return m_enableManagedSpotTrainingHasBeenSet; }
353 inline void SetEnableManagedSpotTraining(bool value) {
354 m_enableManagedSpotTrainingHasBeenSet = true;
355 m_enableManagedSpotTraining = value;
356 }
359 return *this;
360 }
362
364
365 inline const CheckpointConfig& GetCheckpointConfig() const { return m_checkpointConfig; }
366 inline bool CheckpointConfigHasBeenSet() const { return m_checkpointConfigHasBeenSet; }
367 template <typename CheckpointConfigT = CheckpointConfig>
368 void SetCheckpointConfig(CheckpointConfigT&& value) {
369 m_checkpointConfigHasBeenSet = true;
370 m_checkpointConfig = std::forward<CheckpointConfigT>(value);
371 }
372 template <typename CheckpointConfigT = CheckpointConfig>
374 SetCheckpointConfig(std::forward<CheckpointConfigT>(value));
375 return *this;
376 }
378
380
384 inline const RetryStrategy& GetRetryStrategy() const { return m_retryStrategy; }
385 inline bool RetryStrategyHasBeenSet() const { return m_retryStrategyHasBeenSet; }
386 template <typename RetryStrategyT = RetryStrategy>
387 void SetRetryStrategy(RetryStrategyT&& value) {
388 m_retryStrategyHasBeenSet = true;
389 m_retryStrategy = std::forward<RetryStrategyT>(value);
390 }
391 template <typename RetryStrategyT = RetryStrategy>
393 SetRetryStrategy(std::forward<RetryStrategyT>(value));
394 return *this;
395 }
397
399
413 inline const Aws::Map<Aws::String, Aws::String>& GetEnvironment() const { return m_environment; }
414 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
415 template <typename EnvironmentT = Aws::Map<Aws::String, Aws::String>>
416 void SetEnvironment(EnvironmentT&& value) {
417 m_environmentHasBeenSet = true;
418 m_environment = std::forward<EnvironmentT>(value);
419 }
420 template <typename EnvironmentT = Aws::Map<Aws::String, Aws::String>>
422 SetEnvironment(std::forward<EnvironmentT>(value));
423 return *this;
424 }
425 template <typename EnvironmentKeyT = Aws::String, typename EnvironmentValueT = Aws::String>
426 HyperParameterTrainingJobDefinition& AddEnvironment(EnvironmentKeyT&& key, EnvironmentValueT&& value) {
427 m_environmentHasBeenSet = true;
428 m_environment.emplace(std::forward<EnvironmentKeyT>(key), std::forward<EnvironmentValueT>(value));
429 return *this;
430 }
432 private:
433 Aws::String m_definitionName;
434
435 HyperParameterTuningJobObjective m_tuningObjective;
436
437 ParameterRanges m_hyperParameterRanges;
438
439 Aws::Map<Aws::String, Aws::String> m_staticHyperParameters;
440
441 HyperParameterAlgorithmSpecification m_algorithmSpecification;
442
443 Aws::String m_roleArn;
444
445 Aws::Vector<Channel> m_inputDataConfig;
446
447 VpcConfig m_vpcConfig;
448
449 OutputDataConfig m_outputDataConfig;
450
451 ResourceConfig m_resourceConfig;
452
453 HyperParameterTuningResourceConfig m_hyperParameterTuningResourceConfig;
454
455 StoppingCondition m_stoppingCondition;
456
457 bool m_enableNetworkIsolation{false};
458
459 bool m_enableInterContainerTrafficEncryption{false};
460
461 bool m_enableManagedSpotTraining{false};
462
463 CheckpointConfig m_checkpointConfig;
464
465 RetryStrategy m_retryStrategy;
466
468 bool m_definitionNameHasBeenSet = false;
469 bool m_tuningObjectiveHasBeenSet = false;
470 bool m_hyperParameterRangesHasBeenSet = false;
471 bool m_staticHyperParametersHasBeenSet = false;
472 bool m_algorithmSpecificationHasBeenSet = false;
473 bool m_roleArnHasBeenSet = false;
474 bool m_inputDataConfigHasBeenSet = false;
475 bool m_vpcConfigHasBeenSet = false;
476 bool m_outputDataConfigHasBeenSet = false;
477 bool m_resourceConfigHasBeenSet = false;
478 bool m_hyperParameterTuningResourceConfigHasBeenSet = false;
479 bool m_stoppingConditionHasBeenSet = false;
480 bool m_enableNetworkIsolationHasBeenSet = false;
481 bool m_enableInterContainerTrafficEncryptionHasBeenSet = false;
482 bool m_enableManagedSpotTrainingHasBeenSet = false;
483 bool m_checkpointConfigHasBeenSet = false;
484 bool m_retryStrategyHasBeenSet = false;
485 bool m_environmentHasBeenSet = false;
486};
487
488} // namespace Model
489} // namespace SageMaker
490} // 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