Class: AWSCDK::Sagemaker::CfnProcessingJob::ClusterConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_processing_job.rb

Overview

Configuration for the cluster used to run a processing job.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_count:, instance_type:, volume_size_in_gb:, volume_kms_key_id: nil) ⇒ ClusterConfigProperty

Returns a new instance of ClusterConfigProperty.

Parameters:

  • instance_count (Numeric)

    The number of ML compute instances to use in the processing job.

  • instance_type (String)

    The ML compute instance type for the processing job.

  • volume_size_in_gb (Numeric)

    The size of the ML storage volume in gigabytes that you want to provision.

  • volume_kms_key_id (String, nil) (defaults to: nil)

    The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the processing job.



899
900
901
902
903
904
905
906
907
908
# File 'sagemaker/cfn_processing_job.rb', line 899

def initialize(instance_count:, instance_type:, volume_size_in_gb:, volume_kms_key_id: nil)
  @instance_count = instance_count
  Jsii::Type.check_type(@instance_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "instanceCount")
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType")
  @volume_size_in_gb = volume_size_in_gb
  Jsii::Type.check_type(@volume_size_in_gb, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "volumeSizeInGb")
  @volume_kms_key_id = volume_kms_key_id
  Jsii::Type.check_type(@volume_kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "volumeKmsKeyId") unless @volume_kms_key_id.nil?
end

Instance Attribute Details

#instance_countNumeric (readonly)

The number of ML compute instances to use in the processing job.

For distributed processing jobs, specify a value greater than 1. The default value is 1.



916
917
918
# File 'sagemaker/cfn_processing_job.rb', line 916

def instance_count
  @instance_count
end

#instance_typeString (readonly)

The ML compute instance type for the processing job.



921
922
923
# File 'sagemaker/cfn_processing_job.rb', line 921

def instance_type
  @instance_type
end

#volume_kms_key_idString? (readonly)

The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the processing job.

Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage.

For a list of instance types that support local instance storage, see Instance Store Volumes .

For more information about local instance storage encryption, see SSD Instance Store Volumes .



943
944
945
# File 'sagemaker/cfn_processing_job.rb', line 943

def volume_kms_key_id
  @volume_kms_key_id
end

#volume_size_in_gbNumeric (readonly)

The size of the ML storage volume in gigabytes that you want to provision.

You must specify sufficient ML storage for your scenario.

Certain Nitro-based instances include local storage with a fixed total size, dependent on the instance type. When using these instances for processing, Amazon SageMaker mounts the local instance storage instead of Amazon EBS gp2 storage. You can't request a VolumeSizeInGB greater than the total size of the local instance storage.

For a list of instance types that support local instance storage, including the total size per instance type, see Instance Store Volumes .



932
933
934
# File 'sagemaker/cfn_processing_job.rb', line 932

def volume_size_in_gb
  @volume_size_in_gb
end

Class Method Details

.jsii_propertiesObject



945
946
947
948
949
950
951
952
# File 'sagemaker/cfn_processing_job.rb', line 945

def self.jsii_properties
  {
    :instance_count => "instanceCount",
    :instance_type => "instanceType",
    :volume_size_in_gb => "volumeSizeInGb",
    :volume_kms_key_id => "volumeKmsKeyId",
  }
end

Instance Method Details

#to_jsiiObject



954
955
956
957
958
959
960
961
962
963
# File 'sagemaker/cfn_processing_job.rb', line 954

def to_jsii
  result = {}
  result.merge!({
    "instanceCount" => @instance_count,
    "instanceType" => @instance_type,
    "volumeSizeInGb" => @volume_size_in_gb,
    "volumeKmsKeyId" => @volume_kms_key_id,
  })
  result.compact
end