HyperParameterTrainingJobDefinition
¶
Used by
Source code in docs_src/capo_sagemaker/types/hyper_parameter_training_job_definition.py
algorithm_specification
instance-attribute
¶
algorithm_specification: NotRequired[HyperParameterAlgorithmSpecification]
The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches.
definition_name
instance-attribute
¶
definition_name: NotRequired[HyperParameterTrainingJobDefinitionName]
The job definition name.
enable_inter_container_traffic_encryption
instance-attribute
¶
enable_inter_container_traffic_encryption: NotRequired[Boolean]
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.
enable_managed_spot_training
instance-attribute
¶
enable_managed_spot_training: NotRequired[Boolean]
A Boolean indicating whether managed spot training is enabled (True) or not (False).
enable_network_isolation
instance-attribute
¶
enable_network_isolation: NotRequired[Boolean]
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.
environment
instance-attribute
¶
environment: NotRequired[HyperParameterTrainingJobEnvironmentMap]
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 each TrainingJobDefinition 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.
hyper_parameter_tuning_resource_config
instance-attribute
¶
hyper_parameter_tuning_resource_config: NotRequired[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 for TrainingInputMode in the AlgorithmSpecification parameter to additionally store training data in the storage volume (optional).
input_data_config
instance-attribute
¶
input_data_config: NotRequired[InputDataConfig]
An array of Channel objects that specify the input for the training jobs that the tuning job launches.
output_data_config
instance-attribute
¶
output_data_config: NotRequired[OutputDataConfig]
Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches.
resource_config
instance-attribute
¶
resource_config: NotRequired[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 the TrainingInputMode 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.
retry_strategy
instance-attribute
¶
retry_strategy: NotRequired[RetryStrategy]
The number of times to retry the job when the job fails due to an InternalServerError.
role_arn
instance-attribute
¶
role_arn: NotRequired[RoleArn]
The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches.
static_hyper_parameters
instance-attribute
¶
static_hyper_parameters: NotRequired[HyperParameters]
Specifies the values of hyperparameters that do not change for the tuning job.
stopping_condition
instance-attribute
¶
stopping_condition: NotRequired[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.
tuning_objective
instance-attribute
¶
tuning_objective: NotRequired[HyperParameterTuningJobObjective]
vpc_config
instance-attribute
¶
vpc_config: NotRequired[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.