Interface AlgorithmSpecification
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AlgorithmSpecification.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.843Z")
@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", "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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forAlgorithmSpecification
static final class
An implementation forAlgorithmSpecification
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
Name of the algorithm resource to use for the training job.default List<MetricDefinition>
List of metric definition objects.default DockerImage
Registry path of the Docker image that contains the training algorithm.default InputMode
Input 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.Builder
ofAlgorithmSpecification
-