// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateTrainingJobInput {
/// <p>The name of the training job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.</p>
pub training_job_name: ::std::option::Option<::std::string::String>,
/// <p>Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>.</p>
/// <p>You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the <code>Length Constraint</code>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields.</p>
/// </important>
pub hyper_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>. For information about providing your own algorithms, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using Your Own Algorithms with Amazon SageMaker</a>.</p>
pub algorithm_specification: ::std::option::Option<crate::types::AlgorithmSpecification>,
/// <p>The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf.</p>
/// <p>During model training, SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker Roles</a>.</p><note>
/// <p>To be able to pass this role to SageMaker, the caller of this API must have the <code>iam:PassRole</code> permission.</p>
/// </note>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>An array of <code>Channel</code> objects. Each channel is a named input source. <code>InputDataConfig</code> describes the input data and its location.</p>
/// <p>Algorithms can accept input data from one or more channels. For example, an algorithm might have two channels of input data, <code>training_data</code> and <code>validation_data</code>. The configuration for each channel provides the S3, EFS, or FSx location where the input data is stored. It also provides information about the stored data: the MIME type, compression method, and whether the data is wrapped in RecordIO format.</p>
/// <p>Depending on the input mode that the algorithm supports, SageMaker either copies input data files from an S3 bucket to a local directory in the Docker container, or makes it available as input streams. For example, if you specify an EFS location, input data files are available as input streams. They do not need to be downloaded.</p>
/// <p>Your input must be in the same Amazon Web Services region as your training job.</p>
pub input_data_config: ::std::option::Option<::std::vec::Vec<crate::types::Channel>>,
/// <p>Specifies the path to the S3 location where you want to store model artifacts. SageMaker creates subfolders for the artifacts.</p>
pub output_data_config: ::std::option::Option<crate::types::OutputDataConfig>,
/// <p>The resources, including the ML compute instances and ML storage volumes, to use for model training.</p>
/// <p>ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want SageMaker to use the ML storage volume to store the training data, choose <code>File</code> as the <code>TrainingInputMode</code> in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.</p>
pub resource_config: ::std::option::Option<crate::types::ResourceConfig>,
/// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that you want your training job to connect to. Control access to and from your training container by configuring the VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html">Protect Training Jobs by Using an Amazon Virtual Private Cloud</a>.</p>
pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
/// <p>Specifies a limit to how long a model 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.</p>
/// <p>To stop a job, SageMaker sends the algorithm the <code>SIGTERM</code> signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.</p>
pub stopping_condition: ::std::option::Option<crate::types::StoppingCondition>,
/// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request tag variable or plain text fields.</p>
/// </important>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>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 you enable network isolation 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.</p>
pub enable_network_isolation: ::std::option::Option<bool>,
/// <p>To encrypt all communications between ML compute instances in distributed training, choose <code>True</code>. 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. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-encrypt.html">Protect Communications Between ML Compute Instances in a Distributed Training Job</a>.</p>
pub enable_inter_container_traffic_encryption: ::std::option::Option<bool>,
/// <p>To train models using managed spot training, choose <code>True</code>. Managed spot training provides a fully managed and scalable infrastructure for training machine learning models. this option is useful when training jobs can be interrupted and when there is flexibility when the training job is run.</p>
/// <p>The complete and intermediate results of jobs are stored in an Amazon S3 bucket, and can be used as a starting point to train models incrementally. Amazon SageMaker provides metrics and logs in CloudWatch. They can be used to see when managed spot training jobs are running, interrupted, resumed, or completed.</p>
pub enable_managed_spot_training: ::std::option::Option<bool>,
/// <p>Contains information about the output location for managed spot training checkpoint data.</p>
pub checkpoint_config: ::std::option::Option<crate::types::CheckpointConfig>,
/// <p>Configuration information for the Amazon SageMaker Debugger hook parameters, metric and tensor collections, and storage paths. To learn more about how to configure the <code>DebugHookConfig</code> parameter, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-createtrainingjob-api.html">Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job</a>.</p>
pub debug_hook_config: ::std::option::Option<crate::types::DebugHookConfig>,
/// <p>Configuration information for Amazon SageMaker Debugger rules for debugging output tensors.</p>
pub debug_rule_configurations: ::std::option::Option<::std::vec::Vec<crate::types::DebugRuleConfiguration>>,
/// <p>Configuration of storage locations for the Amazon SageMaker Debugger TensorBoard output data.</p>
pub tensor_board_output_config: ::std::option::Option<crate::types::TensorBoardOutputConfig>,
/// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
/// <ul>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
/// </ul>
pub experiment_config: ::std::option::Option<crate::types::ExperimentConfig>,
/// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
pub profiler_config: ::std::option::Option<crate::types::ProfilerConfig>,
/// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
pub profiler_rule_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ProfilerRuleConfiguration>>,
/// <p>The environment variables to set in the Docker container.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.</p>
/// </important>
pub environment: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The number of times to retry the job when the job fails due to an <code>InternalServerError</code>.</p>
pub retry_strategy: ::std::option::Option<crate::types::RetryStrategy>,
/// <p>Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
pub remote_debug_config: ::std::option::Option<crate::types::RemoteDebugConfig>,
/// <p>Contains information about the infrastructure health check configuration for the training job.</p>
pub infra_check_config: ::std::option::Option<crate::types::InfraCheckConfig>,
/// <p>Contains information about attribute-based access control (ABAC) for the training job.</p>
pub session_chaining_config: ::std::option::Option<crate::types::SessionChainingConfig>,
/// <p>The configuration for serverless training jobs.</p>
pub serverless_job_config: ::std::option::Option<crate::types::ServerlessJobConfig>,
/// <p>The MLflow configuration using SageMaker managed MLflow.</p>
pub mlflow_config: ::std::option::Option<crate::types::MlflowConfig>,
/// <p>The configuration for the model package.</p>
pub model_package_config: ::std::option::Option<crate::types::ModelPackageConfig>,
}
impl CreateTrainingJobInput {
/// <p>The name of the training job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.</p>
pub fn training_job_name(&self) -> ::std::option::Option<&str> {
self.training_job_name.as_deref()
}
/// <p>Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>.</p>
/// <p>You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the <code>Length Constraint</code>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields.</p>
/// </important>
pub fn hyper_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.hyper_parameters.as_ref()
}
/// <p>The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>. For information about providing your own algorithms, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using Your Own Algorithms with Amazon SageMaker</a>.</p>
pub fn algorithm_specification(&self) -> ::std::option::Option<&crate::types::AlgorithmSpecification> {
self.algorithm_specification.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf.</p>
/// <p>During model training, SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker Roles</a>.</p><note>
/// <p>To be able to pass this role to SageMaker, the caller of this API must have the <code>iam:PassRole</code> permission.</p>
/// </note>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>An array of <code>Channel</code> objects. Each channel is a named input source. <code>InputDataConfig</code> describes the input data and its location.</p>
/// <p>Algorithms can accept input data from one or more channels. For example, an algorithm might have two channels of input data, <code>training_data</code> and <code>validation_data</code>. The configuration for each channel provides the S3, EFS, or FSx location where the input data is stored. It also provides information about the stored data: the MIME type, compression method, and whether the data is wrapped in RecordIO format.</p>
/// <p>Depending on the input mode that the algorithm supports, SageMaker either copies input data files from an S3 bucket to a local directory in the Docker container, or makes it available as input streams. For example, if you specify an EFS location, input data files are available as input streams. They do not need to be downloaded.</p>
/// <p>Your input must be in the same Amazon Web Services region as your training job.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.input_data_config.is_none()`.
pub fn input_data_config(&self) -> &[crate::types::Channel] {
self.input_data_config.as_deref().unwrap_or_default()
}
/// <p>Specifies the path to the S3 location where you want to store model artifacts. SageMaker creates subfolders for the artifacts.</p>
pub fn output_data_config(&self) -> ::std::option::Option<&crate::types::OutputDataConfig> {
self.output_data_config.as_ref()
}
/// <p>The resources, including the ML compute instances and ML storage volumes, to use for model training.</p>
/// <p>ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want SageMaker to use the ML storage volume to store the training data, choose <code>File</code> as the <code>TrainingInputMode</code> in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.</p>
pub fn resource_config(&self) -> ::std::option::Option<&crate::types::ResourceConfig> {
self.resource_config.as_ref()
}
/// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that you want your training job to connect to. Control access to and from your training container by configuring the VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html">Protect Training Jobs by Using an Amazon Virtual Private Cloud</a>.</p>
pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
self.vpc_config.as_ref()
}
/// <p>Specifies a limit to how long a model 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.</p>
/// <p>To stop a job, SageMaker sends the algorithm the <code>SIGTERM</code> signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.</p>
pub fn stopping_condition(&self) -> ::std::option::Option<&crate::types::StoppingCondition> {
self.stopping_condition.as_ref()
}
/// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request tag variable or plain text fields.</p>
/// </important>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>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 you enable network isolation 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.</p>
pub fn enable_network_isolation(&self) -> ::std::option::Option<bool> {
self.enable_network_isolation
}
/// <p>To encrypt all communications between ML compute instances in distributed training, choose <code>True</code>. 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. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-encrypt.html">Protect Communications Between ML Compute Instances in a Distributed Training Job</a>.</p>
pub fn enable_inter_container_traffic_encryption(&self) -> ::std::option::Option<bool> {
self.enable_inter_container_traffic_encryption
}
/// <p>To train models using managed spot training, choose <code>True</code>. Managed spot training provides a fully managed and scalable infrastructure for training machine learning models. this option is useful when training jobs can be interrupted and when there is flexibility when the training job is run.</p>
/// <p>The complete and intermediate results of jobs are stored in an Amazon S3 bucket, and can be used as a starting point to train models incrementally. Amazon SageMaker provides metrics and logs in CloudWatch. They can be used to see when managed spot training jobs are running, interrupted, resumed, or completed.</p>
pub fn enable_managed_spot_training(&self) -> ::std::option::Option<bool> {
self.enable_managed_spot_training
}
/// <p>Contains information about the output location for managed spot training checkpoint data.</p>
pub fn checkpoint_config(&self) -> ::std::option::Option<&crate::types::CheckpointConfig> {
self.checkpoint_config.as_ref()
}
/// <p>Configuration information for the Amazon SageMaker Debugger hook parameters, metric and tensor collections, and storage paths. To learn more about how to configure the <code>DebugHookConfig</code> parameter, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-createtrainingjob-api.html">Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job</a>.</p>
pub fn debug_hook_config(&self) -> ::std::option::Option<&crate::types::DebugHookConfig> {
self.debug_hook_config.as_ref()
}
/// <p>Configuration information for Amazon SageMaker Debugger rules for debugging output tensors.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.debug_rule_configurations.is_none()`.
pub fn debug_rule_configurations(&self) -> &[crate::types::DebugRuleConfiguration] {
self.debug_rule_configurations.as_deref().unwrap_or_default()
}
/// <p>Configuration of storage locations for the Amazon SageMaker Debugger TensorBoard output data.</p>
pub fn tensor_board_output_config(&self) -> ::std::option::Option<&crate::types::TensorBoardOutputConfig> {
self.tensor_board_output_config.as_ref()
}
/// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
/// <ul>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
/// </ul>
pub fn experiment_config(&self) -> ::std::option::Option<&crate::types::ExperimentConfig> {
self.experiment_config.as_ref()
}
/// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
pub fn profiler_config(&self) -> ::std::option::Option<&crate::types::ProfilerConfig> {
self.profiler_config.as_ref()
}
/// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.profiler_rule_configurations.is_none()`.
pub fn profiler_rule_configurations(&self) -> &[crate::types::ProfilerRuleConfiguration] {
self.profiler_rule_configurations.as_deref().unwrap_or_default()
}
/// <p>The environment variables to set in the Docker container.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.</p>
/// </important>
pub fn environment(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.environment.as_ref()
}
/// <p>The number of times to retry the job when the job fails due to an <code>InternalServerError</code>.</p>
pub fn retry_strategy(&self) -> ::std::option::Option<&crate::types::RetryStrategy> {
self.retry_strategy.as_ref()
}
/// <p>Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
pub fn remote_debug_config(&self) -> ::std::option::Option<&crate::types::RemoteDebugConfig> {
self.remote_debug_config.as_ref()
}
/// <p>Contains information about the infrastructure health check configuration for the training job.</p>
pub fn infra_check_config(&self) -> ::std::option::Option<&crate::types::InfraCheckConfig> {
self.infra_check_config.as_ref()
}
/// <p>Contains information about attribute-based access control (ABAC) for the training job.</p>
pub fn session_chaining_config(&self) -> ::std::option::Option<&crate::types::SessionChainingConfig> {
self.session_chaining_config.as_ref()
}
/// <p>The configuration for serverless training jobs.</p>
pub fn serverless_job_config(&self) -> ::std::option::Option<&crate::types::ServerlessJobConfig> {
self.serverless_job_config.as_ref()
}
/// <p>The MLflow configuration using SageMaker managed MLflow.</p>
pub fn mlflow_config(&self) -> ::std::option::Option<&crate::types::MlflowConfig> {
self.mlflow_config.as_ref()
}
/// <p>The configuration for the model package.</p>
pub fn model_package_config(&self) -> ::std::option::Option<&crate::types::ModelPackageConfig> {
self.model_package_config.as_ref()
}
}
impl CreateTrainingJobInput {
/// Creates a new builder-style object to manufacture [`CreateTrainingJobInput`](crate::operation::create_training_job::CreateTrainingJobInput).
pub fn builder() -> crate::operation::create_training_job::builders::CreateTrainingJobInputBuilder {
crate::operation::create_training_job::builders::CreateTrainingJobInputBuilder::default()
}
}
/// A builder for [`CreateTrainingJobInput`](crate::operation::create_training_job::CreateTrainingJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateTrainingJobInputBuilder {
pub(crate) training_job_name: ::std::option::Option<::std::string::String>,
pub(crate) hyper_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) algorithm_specification: ::std::option::Option<crate::types::AlgorithmSpecification>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) input_data_config: ::std::option::Option<::std::vec::Vec<crate::types::Channel>>,
pub(crate) output_data_config: ::std::option::Option<crate::types::OutputDataConfig>,
pub(crate) resource_config: ::std::option::Option<crate::types::ResourceConfig>,
pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
pub(crate) stopping_condition: ::std::option::Option<crate::types::StoppingCondition>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) enable_network_isolation: ::std::option::Option<bool>,
pub(crate) enable_inter_container_traffic_encryption: ::std::option::Option<bool>,
pub(crate) enable_managed_spot_training: ::std::option::Option<bool>,
pub(crate) checkpoint_config: ::std::option::Option<crate::types::CheckpointConfig>,
pub(crate) debug_hook_config: ::std::option::Option<crate::types::DebugHookConfig>,
pub(crate) debug_rule_configurations: ::std::option::Option<::std::vec::Vec<crate::types::DebugRuleConfiguration>>,
pub(crate) tensor_board_output_config: ::std::option::Option<crate::types::TensorBoardOutputConfig>,
pub(crate) experiment_config: ::std::option::Option<crate::types::ExperimentConfig>,
pub(crate) profiler_config: ::std::option::Option<crate::types::ProfilerConfig>,
pub(crate) profiler_rule_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ProfilerRuleConfiguration>>,
pub(crate) environment: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) retry_strategy: ::std::option::Option<crate::types::RetryStrategy>,
pub(crate) remote_debug_config: ::std::option::Option<crate::types::RemoteDebugConfig>,
pub(crate) infra_check_config: ::std::option::Option<crate::types::InfraCheckConfig>,
pub(crate) session_chaining_config: ::std::option::Option<crate::types::SessionChainingConfig>,
pub(crate) serverless_job_config: ::std::option::Option<crate::types::ServerlessJobConfig>,
pub(crate) mlflow_config: ::std::option::Option<crate::types::MlflowConfig>,
pub(crate) model_package_config: ::std::option::Option<crate::types::ModelPackageConfig>,
}
impl CreateTrainingJobInputBuilder {
/// <p>The name of the training job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.</p>
/// This field is required.
pub fn training_job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.training_job_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the training job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.</p>
pub fn set_training_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.training_job_name = input;
self
}
/// <p>The name of the training job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.</p>
pub fn get_training_job_name(&self) -> &::std::option::Option<::std::string::String> {
&self.training_job_name
}
/// Adds a key-value pair to `hyper_parameters`.
///
/// To override the contents of this collection use [`set_hyper_parameters`](Self::set_hyper_parameters).
///
/// <p>Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>.</p>
/// <p>You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the <code>Length Constraint</code>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields.</p>
/// </important>
pub fn hyper_parameters(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.hyper_parameters.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.hyper_parameters = ::std::option::Option::Some(hash_map);
self
}
/// <p>Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>.</p>
/// <p>You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the <code>Length Constraint</code>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields.</p>
/// </important>
pub fn set_hyper_parameters(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.hyper_parameters = input;
self
}
/// <p>Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>.</p>
/// <p>You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the <code>Length Constraint</code>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields.</p>
/// </important>
pub fn get_hyper_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.hyper_parameters
}
/// <p>The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>. For information about providing your own algorithms, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using Your Own Algorithms with Amazon SageMaker</a>.</p>
pub fn algorithm_specification(mut self, input: crate::types::AlgorithmSpecification) -> Self {
self.algorithm_specification = ::std::option::Option::Some(input);
self
}
/// <p>The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>. For information about providing your own algorithms, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using Your Own Algorithms with Amazon SageMaker</a>.</p>
pub fn set_algorithm_specification(mut self, input: ::std::option::Option<crate::types::AlgorithmSpecification>) -> Self {
self.algorithm_specification = input;
self
}
/// <p>The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html">Algorithms</a>. For information about providing your own algorithms, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using Your Own Algorithms with Amazon SageMaker</a>.</p>
pub fn get_algorithm_specification(&self) -> &::std::option::Option<crate::types::AlgorithmSpecification> {
&self.algorithm_specification
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf.</p>
/// <p>During model training, SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker Roles</a>.</p><note>
/// <p>To be able to pass this role to SageMaker, the caller of this API must have the <code>iam:PassRole</code> permission.</p>
/// </note>
/// This field is required.
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf.</p>
/// <p>During model training, SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker Roles</a>.</p><note>
/// <p>To be able to pass this role to SageMaker, the caller of this API must have the <code>iam:PassRole</code> permission.</p>
/// </note>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf.</p>
/// <p>During model training, SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html">SageMaker Roles</a>.</p><note>
/// <p>To be able to pass this role to SageMaker, the caller of this API must have the <code>iam:PassRole</code> permission.</p>
/// </note>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// Appends an item to `input_data_config`.
///
/// To override the contents of this collection use [`set_input_data_config`](Self::set_input_data_config).
///
/// <p>An array of <code>Channel</code> objects. Each channel is a named input source. <code>InputDataConfig</code> describes the input data and its location.</p>
/// <p>Algorithms can accept input data from one or more channels. For example, an algorithm might have two channels of input data, <code>training_data</code> and <code>validation_data</code>. The configuration for each channel provides the S3, EFS, or FSx location where the input data is stored. It also provides information about the stored data: the MIME type, compression method, and whether the data is wrapped in RecordIO format.</p>
/// <p>Depending on the input mode that the algorithm supports, SageMaker either copies input data files from an S3 bucket to a local directory in the Docker container, or makes it available as input streams. For example, if you specify an EFS location, input data files are available as input streams. They do not need to be downloaded.</p>
/// <p>Your input must be in the same Amazon Web Services region as your training job.</p>
pub fn input_data_config(mut self, input: crate::types::Channel) -> Self {
let mut v = self.input_data_config.unwrap_or_default();
v.push(input);
self.input_data_config = ::std::option::Option::Some(v);
self
}
/// <p>An array of <code>Channel</code> objects. Each channel is a named input source. <code>InputDataConfig</code> describes the input data and its location.</p>
/// <p>Algorithms can accept input data from one or more channels. For example, an algorithm might have two channels of input data, <code>training_data</code> and <code>validation_data</code>. The configuration for each channel provides the S3, EFS, or FSx location where the input data is stored. It also provides information about the stored data: the MIME type, compression method, and whether the data is wrapped in RecordIO format.</p>
/// <p>Depending on the input mode that the algorithm supports, SageMaker either copies input data files from an S3 bucket to a local directory in the Docker container, or makes it available as input streams. For example, if you specify an EFS location, input data files are available as input streams. They do not need to be downloaded.</p>
/// <p>Your input must be in the same Amazon Web Services region as your training job.</p>
pub fn set_input_data_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Channel>>) -> Self {
self.input_data_config = input;
self
}
/// <p>An array of <code>Channel</code> objects. Each channel is a named input source. <code>InputDataConfig</code> describes the input data and its location.</p>
/// <p>Algorithms can accept input data from one or more channels. For example, an algorithm might have two channels of input data, <code>training_data</code> and <code>validation_data</code>. The configuration for each channel provides the S3, EFS, or FSx location where the input data is stored. It also provides information about the stored data: the MIME type, compression method, and whether the data is wrapped in RecordIO format.</p>
/// <p>Depending on the input mode that the algorithm supports, SageMaker either copies input data files from an S3 bucket to a local directory in the Docker container, or makes it available as input streams. For example, if you specify an EFS location, input data files are available as input streams. They do not need to be downloaded.</p>
/// <p>Your input must be in the same Amazon Web Services region as your training job.</p>
pub fn get_input_data_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Channel>> {
&self.input_data_config
}
/// <p>Specifies the path to the S3 location where you want to store model artifacts. SageMaker creates subfolders for the artifacts.</p>
/// This field is required.
pub fn output_data_config(mut self, input: crate::types::OutputDataConfig) -> Self {
self.output_data_config = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the path to the S3 location where you want to store model artifacts. SageMaker creates subfolders for the artifacts.</p>
pub fn set_output_data_config(mut self, input: ::std::option::Option<crate::types::OutputDataConfig>) -> Self {
self.output_data_config = input;
self
}
/// <p>Specifies the path to the S3 location where you want to store model artifacts. SageMaker creates subfolders for the artifacts.</p>
pub fn get_output_data_config(&self) -> &::std::option::Option<crate::types::OutputDataConfig> {
&self.output_data_config
}
/// <p>The resources, including the ML compute instances and ML storage volumes, to use for model training.</p>
/// <p>ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want SageMaker to use the ML storage volume to store the training data, choose <code>File</code> as the <code>TrainingInputMode</code> in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.</p>
pub fn resource_config(mut self, input: crate::types::ResourceConfig) -> Self {
self.resource_config = ::std::option::Option::Some(input);
self
}
/// <p>The resources, including the ML compute instances and ML storage volumes, to use for model training.</p>
/// <p>ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want SageMaker to use the ML storage volume to store the training data, choose <code>File</code> as the <code>TrainingInputMode</code> in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.</p>
pub fn set_resource_config(mut self, input: ::std::option::Option<crate::types::ResourceConfig>) -> Self {
self.resource_config = input;
self
}
/// <p>The resources, including the ML compute instances and ML storage volumes, to use for model training.</p>
/// <p>ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want SageMaker to use the ML storage volume to store the training data, choose <code>File</code> as the <code>TrainingInputMode</code> in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.</p>
pub fn get_resource_config(&self) -> &::std::option::Option<crate::types::ResourceConfig> {
&self.resource_config
}
/// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that you want your training job to connect to. Control access to and from your training container by configuring the VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html">Protect Training Jobs by Using an Amazon Virtual Private Cloud</a>.</p>
pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
self.vpc_config = ::std::option::Option::Some(input);
self
}
/// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that you want your training job to connect to. Control access to and from your training container by configuring the VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html">Protect Training Jobs by Using an Amazon Virtual Private Cloud</a>.</p>
pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
self.vpc_config = input;
self
}
/// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that you want your training job to connect to. Control access to and from your training container by configuring the VPC. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html">Protect Training Jobs by Using an Amazon Virtual Private Cloud</a>.</p>
pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
&self.vpc_config
}
/// <p>Specifies a limit to how long a model 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.</p>
/// <p>To stop a job, SageMaker sends the algorithm the <code>SIGTERM</code> signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.</p>
pub fn stopping_condition(mut self, input: crate::types::StoppingCondition) -> Self {
self.stopping_condition = ::std::option::Option::Some(input);
self
}
/// <p>Specifies a limit to how long a model 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.</p>
/// <p>To stop a job, SageMaker sends the algorithm the <code>SIGTERM</code> signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.</p>
pub fn set_stopping_condition(mut self, input: ::std::option::Option<crate::types::StoppingCondition>) -> Self {
self.stopping_condition = input;
self
}
/// <p>Specifies a limit to how long a model 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.</p>
/// <p>To stop a job, SageMaker sends the algorithm the <code>SIGTERM</code> signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost.</p>
pub fn get_stopping_condition(&self) -> &::std::option::Option<crate::types::StoppingCondition> {
&self.stopping_condition
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request tag variable or plain text fields.</p>
/// </important>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request tag variable or plain text fields.</p>
/// </important>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request tag variable or plain text fields.</p>
/// </important>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>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 you enable network isolation 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.</p>
pub fn enable_network_isolation(mut self, input: bool) -> Self {
self.enable_network_isolation = ::std::option::Option::Some(input);
self
}
/// <p>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 you enable network isolation 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.</p>
pub fn set_enable_network_isolation(mut self, input: ::std::option::Option<bool>) -> Self {
self.enable_network_isolation = input;
self
}
/// <p>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 you enable network isolation 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.</p>
pub fn get_enable_network_isolation(&self) -> &::std::option::Option<bool> {
&self.enable_network_isolation
}
/// <p>To encrypt all communications between ML compute instances in distributed training, choose <code>True</code>. 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. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-encrypt.html">Protect Communications Between ML Compute Instances in a Distributed Training Job</a>.</p>
pub fn enable_inter_container_traffic_encryption(mut self, input: bool) -> Self {
self.enable_inter_container_traffic_encryption = ::std::option::Option::Some(input);
self
}
/// <p>To encrypt all communications between ML compute instances in distributed training, choose <code>True</code>. 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. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-encrypt.html">Protect Communications Between ML Compute Instances in a Distributed Training Job</a>.</p>
pub fn set_enable_inter_container_traffic_encryption(mut self, input: ::std::option::Option<bool>) -> Self {
self.enable_inter_container_traffic_encryption = input;
self
}
/// <p>To encrypt all communications between ML compute instances in distributed training, choose <code>True</code>. 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. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-encrypt.html">Protect Communications Between ML Compute Instances in a Distributed Training Job</a>.</p>
pub fn get_enable_inter_container_traffic_encryption(&self) -> &::std::option::Option<bool> {
&self.enable_inter_container_traffic_encryption
}
/// <p>To train models using managed spot training, choose <code>True</code>. Managed spot training provides a fully managed and scalable infrastructure for training machine learning models. this option is useful when training jobs can be interrupted and when there is flexibility when the training job is run.</p>
/// <p>The complete and intermediate results of jobs are stored in an Amazon S3 bucket, and can be used as a starting point to train models incrementally. Amazon SageMaker provides metrics and logs in CloudWatch. They can be used to see when managed spot training jobs are running, interrupted, resumed, or completed.</p>
pub fn enable_managed_spot_training(mut self, input: bool) -> Self {
self.enable_managed_spot_training = ::std::option::Option::Some(input);
self
}
/// <p>To train models using managed spot training, choose <code>True</code>. Managed spot training provides a fully managed and scalable infrastructure for training machine learning models. this option is useful when training jobs can be interrupted and when there is flexibility when the training job is run.</p>
/// <p>The complete and intermediate results of jobs are stored in an Amazon S3 bucket, and can be used as a starting point to train models incrementally. Amazon SageMaker provides metrics and logs in CloudWatch. They can be used to see when managed spot training jobs are running, interrupted, resumed, or completed.</p>
pub fn set_enable_managed_spot_training(mut self, input: ::std::option::Option<bool>) -> Self {
self.enable_managed_spot_training = input;
self
}
/// <p>To train models using managed spot training, choose <code>True</code>. Managed spot training provides a fully managed and scalable infrastructure for training machine learning models. this option is useful when training jobs can be interrupted and when there is flexibility when the training job is run.</p>
/// <p>The complete and intermediate results of jobs are stored in an Amazon S3 bucket, and can be used as a starting point to train models incrementally. Amazon SageMaker provides metrics and logs in CloudWatch. They can be used to see when managed spot training jobs are running, interrupted, resumed, or completed.</p>
pub fn get_enable_managed_spot_training(&self) -> &::std::option::Option<bool> {
&self.enable_managed_spot_training
}
/// <p>Contains information about the output location for managed spot training checkpoint data.</p>
pub fn checkpoint_config(mut self, input: crate::types::CheckpointConfig) -> Self {
self.checkpoint_config = ::std::option::Option::Some(input);
self
}
/// <p>Contains information about the output location for managed spot training checkpoint data.</p>
pub fn set_checkpoint_config(mut self, input: ::std::option::Option<crate::types::CheckpointConfig>) -> Self {
self.checkpoint_config = input;
self
}
/// <p>Contains information about the output location for managed spot training checkpoint data.</p>
pub fn get_checkpoint_config(&self) -> &::std::option::Option<crate::types::CheckpointConfig> {
&self.checkpoint_config
}
/// <p>Configuration information for the Amazon SageMaker Debugger hook parameters, metric and tensor collections, and storage paths. To learn more about how to configure the <code>DebugHookConfig</code> parameter, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-createtrainingjob-api.html">Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job</a>.</p>
pub fn debug_hook_config(mut self, input: crate::types::DebugHookConfig) -> Self {
self.debug_hook_config = ::std::option::Option::Some(input);
self
}
/// <p>Configuration information for the Amazon SageMaker Debugger hook parameters, metric and tensor collections, and storage paths. To learn more about how to configure the <code>DebugHookConfig</code> parameter, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-createtrainingjob-api.html">Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job</a>.</p>
pub fn set_debug_hook_config(mut self, input: ::std::option::Option<crate::types::DebugHookConfig>) -> Self {
self.debug_hook_config = input;
self
}
/// <p>Configuration information for the Amazon SageMaker Debugger hook parameters, metric and tensor collections, and storage paths. To learn more about how to configure the <code>DebugHookConfig</code> parameter, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-createtrainingjob-api.html">Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job</a>.</p>
pub fn get_debug_hook_config(&self) -> &::std::option::Option<crate::types::DebugHookConfig> {
&self.debug_hook_config
}
/// Appends an item to `debug_rule_configurations`.
///
/// To override the contents of this collection use [`set_debug_rule_configurations`](Self::set_debug_rule_configurations).
///
/// <p>Configuration information for Amazon SageMaker Debugger rules for debugging output tensors.</p>
pub fn debug_rule_configurations(mut self, input: crate::types::DebugRuleConfiguration) -> Self {
let mut v = self.debug_rule_configurations.unwrap_or_default();
v.push(input);
self.debug_rule_configurations = ::std::option::Option::Some(v);
self
}
/// <p>Configuration information for Amazon SageMaker Debugger rules for debugging output tensors.</p>
pub fn set_debug_rule_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DebugRuleConfiguration>>) -> Self {
self.debug_rule_configurations = input;
self
}
/// <p>Configuration information for Amazon SageMaker Debugger rules for debugging output tensors.</p>
pub fn get_debug_rule_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DebugRuleConfiguration>> {
&self.debug_rule_configurations
}
/// <p>Configuration of storage locations for the Amazon SageMaker Debugger TensorBoard output data.</p>
pub fn tensor_board_output_config(mut self, input: crate::types::TensorBoardOutputConfig) -> Self {
self.tensor_board_output_config = ::std::option::Option::Some(input);
self
}
/// <p>Configuration of storage locations for the Amazon SageMaker Debugger TensorBoard output data.</p>
pub fn set_tensor_board_output_config(mut self, input: ::std::option::Option<crate::types::TensorBoardOutputConfig>) -> Self {
self.tensor_board_output_config = input;
self
}
/// <p>Configuration of storage locations for the Amazon SageMaker Debugger TensorBoard output data.</p>
pub fn get_tensor_board_output_config(&self) -> &::std::option::Option<crate::types::TensorBoardOutputConfig> {
&self.tensor_board_output_config
}
/// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
/// <ul>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
/// </ul>
pub fn experiment_config(mut self, input: crate::types::ExperimentConfig) -> Self {
self.experiment_config = ::std::option::Option::Some(input);
self
}
/// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
/// <ul>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
/// </ul>
pub fn set_experiment_config(mut self, input: ::std::option::Option<crate::types::ExperimentConfig>) -> Self {
self.experiment_config = input;
self
}
/// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
/// <ul>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
/// </ul>
pub fn get_experiment_config(&self) -> &::std::option::Option<crate::types::ExperimentConfig> {
&self.experiment_config
}
/// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
pub fn profiler_config(mut self, input: crate::types::ProfilerConfig) -> Self {
self.profiler_config = ::std::option::Option::Some(input);
self
}
/// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
pub fn set_profiler_config(mut self, input: ::std::option::Option<crate::types::ProfilerConfig>) -> Self {
self.profiler_config = input;
self
}
/// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
pub fn get_profiler_config(&self) -> &::std::option::Option<crate::types::ProfilerConfig> {
&self.profiler_config
}
/// Appends an item to `profiler_rule_configurations`.
///
/// To override the contents of this collection use [`set_profiler_rule_configurations`](Self::set_profiler_rule_configurations).
///
/// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
pub fn profiler_rule_configurations(mut self, input: crate::types::ProfilerRuleConfiguration) -> Self {
let mut v = self.profiler_rule_configurations.unwrap_or_default();
v.push(input);
self.profiler_rule_configurations = ::std::option::Option::Some(v);
self
}
/// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
pub fn set_profiler_rule_configurations(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::ProfilerRuleConfiguration>>,
) -> Self {
self.profiler_rule_configurations = input;
self
}
/// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
pub fn get_profiler_rule_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfilerRuleConfiguration>> {
&self.profiler_rule_configurations
}
/// Adds a key-value pair to `environment`.
///
/// To override the contents of this collection use [`set_environment`](Self::set_environment).
///
/// <p>The environment variables to set in the Docker container.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.</p>
/// </important>
pub fn environment(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.environment.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.environment = ::std::option::Option::Some(hash_map);
self
}
/// <p>The environment variables to set in the Docker container.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.</p>
/// </important>
pub fn set_environment(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.environment = input;
self
}
/// <p>The environment variables to set in the Docker container.</p><important>
/// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.</p>
/// </important>
pub fn get_environment(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.environment
}
/// <p>The number of times to retry the job when the job fails due to an <code>InternalServerError</code>.</p>
pub fn retry_strategy(mut self, input: crate::types::RetryStrategy) -> Self {
self.retry_strategy = ::std::option::Option::Some(input);
self
}
/// <p>The number of times to retry the job when the job fails due to an <code>InternalServerError</code>.</p>
pub fn set_retry_strategy(mut self, input: ::std::option::Option<crate::types::RetryStrategy>) -> Self {
self.retry_strategy = input;
self
}
/// <p>The number of times to retry the job when the job fails due to an <code>InternalServerError</code>.</p>
pub fn get_retry_strategy(&self) -> &::std::option::Option<crate::types::RetryStrategy> {
&self.retry_strategy
}
/// <p>Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
pub fn remote_debug_config(mut self, input: crate::types::RemoteDebugConfig) -> Self {
self.remote_debug_config = ::std::option::Option::Some(input);
self
}
/// <p>Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
pub fn set_remote_debug_config(mut self, input: ::std::option::Option<crate::types::RemoteDebugConfig>) -> Self {
self.remote_debug_config = input;
self
}
/// <p>Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
pub fn get_remote_debug_config(&self) -> &::std::option::Option<crate::types::RemoteDebugConfig> {
&self.remote_debug_config
}
/// <p>Contains information about the infrastructure health check configuration for the training job.</p>
pub fn infra_check_config(mut self, input: crate::types::InfraCheckConfig) -> Self {
self.infra_check_config = ::std::option::Option::Some(input);
self
}
/// <p>Contains information about the infrastructure health check configuration for the training job.</p>
pub fn set_infra_check_config(mut self, input: ::std::option::Option<crate::types::InfraCheckConfig>) -> Self {
self.infra_check_config = input;
self
}
/// <p>Contains information about the infrastructure health check configuration for the training job.</p>
pub fn get_infra_check_config(&self) -> &::std::option::Option<crate::types::InfraCheckConfig> {
&self.infra_check_config
}
/// <p>Contains information about attribute-based access control (ABAC) for the training job.</p>
pub fn session_chaining_config(mut self, input: crate::types::SessionChainingConfig) -> Self {
self.session_chaining_config = ::std::option::Option::Some(input);
self
}
/// <p>Contains information about attribute-based access control (ABAC) for the training job.</p>
pub fn set_session_chaining_config(mut self, input: ::std::option::Option<crate::types::SessionChainingConfig>) -> Self {
self.session_chaining_config = input;
self
}
/// <p>Contains information about attribute-based access control (ABAC) for the training job.</p>
pub fn get_session_chaining_config(&self) -> &::std::option::Option<crate::types::SessionChainingConfig> {
&self.session_chaining_config
}
/// <p>The configuration for serverless training jobs.</p>
pub fn serverless_job_config(mut self, input: crate::types::ServerlessJobConfig) -> Self {
self.serverless_job_config = ::std::option::Option::Some(input);
self
}
/// <p>The configuration for serverless training jobs.</p>
pub fn set_serverless_job_config(mut self, input: ::std::option::Option<crate::types::ServerlessJobConfig>) -> Self {
self.serverless_job_config = input;
self
}
/// <p>The configuration for serverless training jobs.</p>
pub fn get_serverless_job_config(&self) -> &::std::option::Option<crate::types::ServerlessJobConfig> {
&self.serverless_job_config
}
/// <p>The MLflow configuration using SageMaker managed MLflow.</p>
pub fn mlflow_config(mut self, input: crate::types::MlflowConfig) -> Self {
self.mlflow_config = ::std::option::Option::Some(input);
self
}
/// <p>The MLflow configuration using SageMaker managed MLflow.</p>
pub fn set_mlflow_config(mut self, input: ::std::option::Option<crate::types::MlflowConfig>) -> Self {
self.mlflow_config = input;
self
}
/// <p>The MLflow configuration using SageMaker managed MLflow.</p>
pub fn get_mlflow_config(&self) -> &::std::option::Option<crate::types::MlflowConfig> {
&self.mlflow_config
}
/// <p>The configuration for the model package.</p>
pub fn model_package_config(mut self, input: crate::types::ModelPackageConfig) -> Self {
self.model_package_config = ::std::option::Option::Some(input);
self
}
/// <p>The configuration for the model package.</p>
pub fn set_model_package_config(mut self, input: ::std::option::Option<crate::types::ModelPackageConfig>) -> Self {
self.model_package_config = input;
self
}
/// <p>The configuration for the model package.</p>
pub fn get_model_package_config(&self) -> &::std::option::Option<crate::types::ModelPackageConfig> {
&self.model_package_config
}
/// Consumes the builder and constructs a [`CreateTrainingJobInput`](crate::operation::create_training_job::CreateTrainingJobInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_training_job::CreateTrainingJobInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_training_job::CreateTrainingJobInput {
training_job_name: self.training_job_name,
hyper_parameters: self.hyper_parameters,
algorithm_specification: self.algorithm_specification,
role_arn: self.role_arn,
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
resource_config: self.resource_config,
vpc_config: self.vpc_config,
stopping_condition: self.stopping_condition,
tags: self.tags,
enable_network_isolation: self.enable_network_isolation,
enable_inter_container_traffic_encryption: self.enable_inter_container_traffic_encryption,
enable_managed_spot_training: self.enable_managed_spot_training,
checkpoint_config: self.checkpoint_config,
debug_hook_config: self.debug_hook_config,
debug_rule_configurations: self.debug_rule_configurations,
tensor_board_output_config: self.tensor_board_output_config,
experiment_config: self.experiment_config,
profiler_config: self.profiler_config,
profiler_rule_configurations: self.profiler_rule_configurations,
environment: self.environment,
retry_strategy: self.retry_strategy,
remote_debug_config: self.remote_debug_config,
infra_check_config: self.infra_check_config,
session_chaining_config: self.session_chaining_config,
serverless_job_config: self.serverless_job_config,
mlflow_config: self.mlflow_config,
model_package_config: self.model_package_config,
})
}
}