@Generated(value="jsii-pacmak/1.72.0 (build 4b8828b)", date="2023-01-03T16:22:40.668Z") @Stability(value=Stable) public interface ResourceConfig extends software.amazon.jsii.JsiiSerializable
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() |
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.
|
@Stability(value=Stable) @NotNull Number getInstanceCount()
Default: 1 instance.
@Stability(value=Stable) @NotNull 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)
@Stability(value=Stable) @NotNull Size getVolumeSize()
Default: 10 GB EBS volume.
@Stability(value=Stable) @Nullable default IKey getVolumeEncryptionKey()
Default: - Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account
@Stability(value=Stable) static ResourceConfig.Builder builder()
ResourceConfig.Builder of ResourceConfigCopyright © 2023. All rights reserved.