Class HyperParameterTrainingJobDefinition
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<HyperParameterTrainingJobDefinition.Builder,
HyperParameterTrainingJobDefinition>
Defines the training jobs launched by a hyperparameter tuning job.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches.builder()
final CheckpointConfig
Returns the value of the CheckpointConfig property for this object.final String
The job definition name.final Boolean
To encrypt all communications between ML compute instances in distributed training, chooseTrue
.final Boolean
A Boolean indicating whether managed spot training is enabled (True
) or not (False
).final Boolean
Isolates the training container.An environment variable that you can pass into the SageMaker CreateTrainingJob API.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the Environment property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the InputDataConfig property.final boolean
For responses, this returns true if the service returned a value for the StaticHyperParameters property.final ParameterRanges
Returns the value of the HyperParameterRanges property for this object.The configuration for the hyperparameter tuning resources, including the compute instances and storage volumes, used for training jobs launched by the tuning job.An array of Channel objects that specify the input for the training jobs that the tuning job launches.final OutputDataConfig
Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches.final ResourceConfig
The resources, including the compute instances and storage volumes, to use for the training jobs that the tuning job launches.final RetryStrategy
The number of times to retry the job when the job fails due to anInternalServerError
.final String
roleArn()
The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches.static Class
<? extends HyperParameterTrainingJobDefinition.Builder> Specifies the values of hyperparameters that do not change for the tuning job.final StoppingCondition
Specifies a limit to how long a model hyperparameter training job can run.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Returns the value of the TuningObjective property for this object.final VpcConfig
The VpcConfig object that specifies the VPC that you want the training jobs that this hyperparameter tuning job launches to connect to.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
definitionName
The job definition name.
- Returns:
- The job definition name.
-
tuningObjective
Returns the value of the TuningObjective property for this object.- Returns:
- The value of the TuningObjective property for this object.
-
hyperParameterRanges
Returns the value of the HyperParameterRanges property for this object.- Returns:
- The value of the HyperParameterRanges property for this object.
-
hasStaticHyperParameters
public final boolean hasStaticHyperParameters()For responses, this returns true if the service returned a value for the StaticHyperParameters property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
staticHyperParameters
Specifies the values of hyperparameters that do not change for the tuning job.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasStaticHyperParameters()
method.- Returns:
- Specifies the values of hyperparameters that do not change for the tuning job.
-
algorithmSpecification
The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches.
- Returns:
- The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches.
-
roleArn
The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches.
- Returns:
- The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches.
-
hasInputDataConfig
public final boolean hasInputDataConfig()For responses, this returns true if the service returned a value for the InputDataConfig property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
inputDataConfig
An array of Channel objects that specify the input for the training jobs that the tuning job launches.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInputDataConfig()
method.- Returns:
- An array of Channel objects that specify the input for the training jobs that the tuning job launches.
-
vpcConfig
The VpcConfig object that specifies the VPC that you want the training jobs that this hyperparameter tuning job launches to connect to. Control access to and from your training container by configuring the VPC. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud.
- Returns:
- The VpcConfig object that specifies the VPC that you want the training jobs that this hyperparameter tuning job launches to connect to. Control access to and from your training container by configuring the VPC. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud.
-
outputDataConfig
Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches.
- Returns:
- Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches.
-
resourceConfig
The resources, including the compute instances and storage volumes, to use for the training jobs that the tuning job launches.
Storage volumes store model artifacts and incremental states. Training algorithms might also use storage volumes for scratch space. If you want SageMaker to use the storage volume to store the training data, choose
File
as theTrainingInputMode
in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.If you want to use hyperparameter optimization with instance type flexibility, use
HyperParameterTuningResourceConfig
instead.- Returns:
- The resources, including the compute instances and storage volumes, to use for the training jobs that the
tuning job launches.
Storage volumes store model artifacts and incremental states. Training algorithms might also use storage volumes for scratch space. If you want SageMaker to use the storage volume to store the training data, choose
File
as theTrainingInputMode
in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.If you want to use hyperparameter optimization with instance type flexibility, use
HyperParameterTuningResourceConfig
instead.
-
hyperParameterTuningResourceConfig
The configuration for the hyperparameter tuning resources, including the compute instances and storage volumes, used for training jobs launched by the tuning job. By default, storage volumes hold model artifacts and incremental states. Choose
File
forTrainingInputMode
in theAlgorithmSpecification
parameter to additionally store training data in the storage volume (optional).- Returns:
- The configuration for the hyperparameter tuning resources, including the compute instances and storage
volumes, used for training jobs launched by the tuning job. By default, storage volumes hold model
artifacts and incremental states. Choose
File
forTrainingInputMode
in theAlgorithmSpecification
parameter to additionally store training data in the storage volume (optional).
-
stoppingCondition
Specifies a limit to how long a model hyperparameter training job can run. It also specifies how long a managed spot training job has to complete. When the job reaches the time limit, SageMaker ends the training job. Use this API to cap model training costs.
- Returns:
- Specifies a limit to how long a model hyperparameter training job can run. It also specifies how long a managed spot training job has to complete. When the job reaches the time limit, SageMaker ends the training job. Use this API to cap model training costs.
-
enableNetworkIsolation
Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If network isolation is used for training jobs that are configured to use a VPC, SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.
- Returns:
- Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If network isolation is used for training jobs that are configured to use a VPC, SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.
-
enableInterContainerTrafficEncryption
To encrypt all communications between ML compute instances in distributed training, choose
True
. Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training.- Returns:
- To encrypt all communications between ML compute instances in distributed training, choose
True
. Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training.
-
enableManagedSpotTraining
A Boolean indicating whether managed spot training is enabled (
True
) or not (False
).- Returns:
- A Boolean indicating whether managed spot training is enabled (
True
) or not (False
).
-
checkpointConfig
Returns the value of the CheckpointConfig property for this object.- Returns:
- The value of the CheckpointConfig property for this object.
-
retryStrategy
The number of times to retry the job when the job fails due to an
InternalServerError
.- Returns:
- The number of times to retry the job when the job fails due to an
InternalServerError
.
-
hasEnvironment
public final boolean hasEnvironment()For responses, this returns true if the service returned a value for the Environment property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
environment
An environment variable that you can pass into the SageMaker CreateTrainingJob API. You can use an existing environment variable from the training container or use your own. See Define metrics and variables for more information.
The maximum number of items specified for
Map Entries
refers to the maximum number of environment variables for eachTrainingJobDefinition
and also the maximum for the hyperparameter tuning job itself. That is, the sum of the number of environment variables for all the training job definitions can't exceed the maximum number specified.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasEnvironment()
method.- Returns:
- An environment variable that you can pass into the SageMaker CreateTrainingJob API. You can use an existing environment variable from the training container or use your own. See Define metrics and variables for more information.
The maximum number of items specified for
Map Entries
refers to the maximum number of environment variables for eachTrainingJobDefinition
and also the maximum for the hyperparameter tuning job itself. That is, the sum of the number of environment variables for all the training job definitions can't exceed the maximum number specified.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<HyperParameterTrainingJobDefinition.Builder,
HyperParameterTrainingJobDefinition> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
public static Class<? extends HyperParameterTrainingJobDefinition.Builder> serializableBuilderClass() -
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-