public static final class ResourceConfig.Builder
extends java.lang.Object
ResourceConfig
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ResourceConfig |
build()
Builds the configured instance.
|
ResourceConfig.Builder |
instanceCount(java.lang.Number instanceCount)
Sets the value of
ResourceConfig.getInstanceCount() |
ResourceConfig.Builder |
instanceType(InstanceType instanceType)
Sets the value of
ResourceConfig.getInstanceType() |
ResourceConfig.Builder |
volumeEncryptionKey(IKey volumeEncryptionKey)
Sets the value of
ResourceConfig.getVolumeEncryptionKey() |
ResourceConfig.Builder |
volumeSize(Size volumeSize)
Sets the value of
ResourceConfig.getVolumeSize() |
public ResourceConfig.Builder instanceCount(java.lang.Number instanceCount)
ResourceConfig.getInstanceCount()
instanceCount
- The number of ML compute instances to use. This parameter is required.this
public ResourceConfig.Builder instanceType(InstanceType instanceType)
ResourceConfig.getInstanceType()
instanceType
- ML compute instance type. This parameter is required.
To provide an instance type from the task input, supply an instance type in the following way
where the value in the task input is an EC2 instance type prepended with "ml.":
new InstanceType(JsonPath.stringAt("$.path.to.instanceType"));
this
public ResourceConfig.Builder volumeSize(Size volumeSize)
ResourceConfig.getVolumeSize()
volumeSize
- Size of the ML storage volume that you want to provision. This parameter is required.this
public ResourceConfig.Builder volumeEncryptionKey(IKey volumeEncryptionKey)
ResourceConfig.getVolumeEncryptionKey()
volumeEncryptionKey
- KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job.this
public ResourceConfig build()
ResourceConfig
java.lang.NullPointerException
- if any required attribute was not provided