1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A flag to indicate if you want to use Autotune to automatically find optimal values for the following fields:</p>
/// <ul>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTuningJobConfig.html#sagemaker-Type-HyperParameterTuningJobConfig-ParameterRanges">ParameterRanges</a>: The names and ranges of parameters that a hyperparameter tuning job can optimize.</p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ResourceLimits.html">ResourceLimits</a>: The maximum resources that can be used for a training job. These resources include the maximum number of training jobs, the maximum runtime of a tuning job, and the maximum number of training jobs to run at the same time.</p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTuningJobConfig.html#sagemaker-Type-HyperParameterTuningJobConfig-TrainingJobEarlyStoppingType">TrainingJobEarlyStoppingType</a>: A flag that specifies whether or not to use early stopping for training jobs launched by a hyperparameter tuning job.</p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTrainingJobDefinition.html#sagemaker-Type-HyperParameterTrainingJobDefinition-RetryStrategy">RetryStrategy</a>: The number of times to retry a training job.</p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTuningJobConfig.html">Strategy</a>: Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training jobs that it launches.</p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ConvergenceDetected.html">ConvergenceDetected</a>: A flag to indicate that Automatic model tuning (AMT) has detected model convergence.</p></li>
/// </ul>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Autotune {
/// <p>Set <code>Mode</code> to <code>Enabled</code> if you want to use Autotune.</p>
pub mode: ::std::option::Option<crate::types::AutotuneMode>,
}
impl Autotune {
/// <p>Set <code>Mode</code> to <code>Enabled</code> if you want to use Autotune.</p>
pub fn mode(&self) -> ::std::option::Option<&crate::types::AutotuneMode> {
self.mode.as_ref()
}
}
impl Autotune {
/// Creates a new builder-style object to manufacture [`Autotune`](crate::types::Autotune).
pub fn builder() -> crate::types::builders::AutotuneBuilder {
crate::types::builders::AutotuneBuilder::default()
}
}
/// A builder for [`Autotune`](crate::types::Autotune).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AutotuneBuilder {
pub(crate) mode: ::std::option::Option<crate::types::AutotuneMode>,
}
impl AutotuneBuilder {
/// <p>Set <code>Mode</code> to <code>Enabled</code> if you want to use Autotune.</p>
/// This field is required.
pub fn mode(mut self, input: crate::types::AutotuneMode) -> Self {
self.mode = ::std::option::Option::Some(input);
self
}
/// <p>Set <code>Mode</code> to <code>Enabled</code> if you want to use Autotune.</p>
pub fn set_mode(mut self, input: ::std::option::Option<crate::types::AutotuneMode>) -> Self {
self.mode = input;
self
}
/// <p>Set <code>Mode</code> to <code>Enabled</code> if you want to use Autotune.</p>
pub fn get_mode(&self) -> &::std::option::Option<crate::types::AutotuneMode> {
&self.mode
}
/// Consumes the builder and constructs a [`Autotune`](crate::types::Autotune).
pub fn build(self) -> crate::types::Autotune {
crate::types::Autotune { mode: self.mode }
}
}