@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-31T18:37:01.080Z")
public interface ResourceConfig
Example:
SageMakerCreateTrainingJob.Builder.create(this, "TrainSagemaker") .trainingJobName(JsonPath.stringAt("$.JobName")) .algorithmSpecification(AlgorithmSpecification.builder() .algorithmName("BlazingText") .trainingInputMode(InputMode.FILE) .build()) .inputDataConfig(List.of(Channel.builder() .channelName("train") .dataSource(DataSource.builder() .s3DataSource(S3DataSource.builder() .s3DataType(S3DataType.S3_PREFIX) .s3Location(S3Location.fromJsonExpression("$.S3Bucket")) .build()) .build()) .build())) .outputDataConfig(OutputDataConfig.builder() .s3OutputLocation(S3Location.fromBucket(Bucket.fromBucketName(this, "Bucket", "mybucket"), "myoutputpath")) .build()) .resourceConfig(ResourceConfig.builder() .instanceCount(1) .instanceType(new InstanceType(JsonPath.stringAt("$.InstanceType"))) .volumeSize(Size.gibibytes(50)) .build()) // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume .stoppingCondition(StoppingCondition.builder() .maxRuntime(Duration.hours(2)) .build()) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
ResourceConfig.Builder
A builder for
ResourceConfig |
static class |
ResourceConfig.Jsii$Proxy
An implementation for
ResourceConfig |
Modifier and Type | Method and Description |
---|---|
static ResourceConfig.Builder |
builder() |
java.lang.Number |
getInstanceCount()
The number of ML compute instances to use.
|
InstanceType |
getInstanceType()
ML compute instance type.
|
default IKey |
getVolumeEncryptionKey()
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.
|
Size |
getVolumeSize()
Size of the ML storage volume that you want to provision.
|
java.lang.Number getInstanceCount()
Default: 1 instance.
InstanceType getInstanceType()
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"));
Default: ec2.InstanceType(ec2.InstanceClass.M4, ec2.InstanceType.XLARGE)
Size getVolumeSize()
Default: 10 GB EBS volume.
default IKey getVolumeEncryptionKey()
Default: - Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account
static ResourceConfig.Builder builder()
ResourceConfig.Builder
of ResourceConfig