Class: Aws::SageMaker::Types::HyperParameterTrainingJobDefinition

Inherits:
Struct
  • Object
show all
Includes:
Aws::Structure
Defined in:
lib/aws-sdk-sagemaker/types.rb

Overview

Note:

When making an API call, you may pass HyperParameterTrainingJobDefinition data as a hash:

{
  static_hyper_parameters: {
    "ParameterKey" => "ParameterValue",
  },
  algorithm_specification: { # required
    training_image: "AlgorithmImage",
    training_input_mode: "Pipe", # required, accepts Pipe, File
    algorithm_name: "ArnOrName",
    metric_definitions: [
      {
        name: "MetricName", # required
        regex: "MetricRegex", # required
      },
    ],
  },
  role_arn: "RoleArn", # required
  input_data_config: [
    {
      channel_name: "ChannelName", # required
      data_source: { # required
        s3_data_source: { # required
          s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix, AugmentedManifestFile
          s3_uri: "S3Uri", # required
          s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
          attribute_names: ["AttributeName"],
        },
      },
      content_type: "ContentType",
      compression_type: "None", # accepts None, Gzip
      record_wrapper_type: "None", # accepts None, RecordIO
      input_mode: "Pipe", # accepts Pipe, File
      shuffle_config: {
        seed: 1, # required
      },
    },
  ],
  vpc_config: {
    security_group_ids: ["SecurityGroupId"], # required
    subnets: ["SubnetId"], # required
  },
  output_data_config: { # required
    kms_key_id: "KmsKeyId",
    s3_output_path: "S3Uri", # required
  },
  resource_config: { # required
    instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.2xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.m4.16xlarge, ml.m5.large, ml.m5.xlarge, ml.m5.2xlarge, ml.m5.4xlarge, ml.m5.12xlarge, ml.m5.24xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.4xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge
    instance_count: 1, # required
    volume_size_in_gb: 1, # required
    volume_kms_key_id: "KmsKeyId",
  },
  stopping_condition: { # required
    max_runtime_in_seconds: 1,
  },
  enable_network_isolation: false,
  enable_inter_container_traffic_encryption: false,
}

Defines the training jobs launched by a hyperparameter tuning job.

Instance Attribute Summary collapse

Instance Attribute Details

#algorithm_specificationTypes::HyperParameterAlgorithmSpecification

The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches.



5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#enable_inter_container_traffic_encryptionBoolean

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:

  • (Boolean)


5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#enable_network_isolationBoolean

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, Amazon SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.

<note markdown=“1”> The Semantic Segmentation built-in algorithm does not support network isolation.

</note>

Returns:

  • (Boolean)


5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#input_data_configArray<Types::Channel>

An array of Channel objects that specify the input for the training jobs that the tuning job launches.

Returns:



5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#output_data_configTypes::OutputDataConfig

Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches.



5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#resource_configTypes::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 Amazon 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.



5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#role_arnString

The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches.

Returns:

  • (String)


5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#static_hyper_parametersHash<String,String>

Specifies the values of hyperparameters that do not change for the tuning job.

Returns:

  • (Hash<String,String>)


5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#stopping_conditionTypes::StoppingCondition

Sets a maximum duration for the training jobs that the tuning job launches. Use this parameter to limit model training costs.

To stop a job, Amazon SageMaker sends the algorithm the ‘SIGTERM` signal. This delays job termination for 120 seconds. Algorithms might use this 120-second window to save the model artifacts.

When Amazon SageMaker terminates a job because the stopping condition has been met, training algorithms provided by Amazon SageMaker save the intermediate results of the job.



5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end

#vpc_configTypes::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].

[1]: docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html

Returns:



5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/aws-sdk-sagemaker/types.rb', line 5476

class HyperParameterTrainingJobDefinition < Struct.new(
  :static_hyper_parameters,
  :algorithm_specification,
  :role_arn,
  :input_data_config,
  :vpc_config,
  :output_data_config,
  :resource_config,
  :stopping_condition,
  :enable_network_isolation,
  :enable_inter_container_traffic_encryption)
  include Aws::Structure
end