Interface AlgorithmSpecification
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AlgorithmSpecification.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:49.537Z")
@Stability(Stable)
public interface AlgorithmSpecification
extends software.amazon.jsii.JsiiSerializable
Specify the training algorithm and algorithm-specific metadata.
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", "amzn-s3-demo-bucket"), "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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAlgorithmSpecificationstatic final classAn implementation forAlgorithmSpecification -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringName of the algorithm resource to use for the training job.default List<MetricDefinition> List of metric definition objects.default DockerImageRegistry path of the Docker image that contains the training algorithm.default InputModeInput mode that the algorithm supports.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAlgorithmName
Name of the algorithm resource to use for the training job.This must be an algorithm resource that you created or subscribe to on AWS Marketplace. If you specify a value for this parameter, you can't specify a value for TrainingImage.
Default: - No algorithm is specified
-
getMetricDefinitions
List of metric definition objects.Each object specifies the metric name and regular expressions used to parse algorithm logs.
Default: - No metrics
-
getTrainingImage
Registry path of the Docker image that contains the training algorithm.Default: - No Docker image is specified
-
getTrainingInputMode
Input mode that the algorithm supports.Default: 'File' mode
-
builder
- Returns:
- a
AlgorithmSpecification.BuilderofAlgorithmSpecification
-