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();
 
  • Method Details

    • getAlgorithmName

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) @Nullable default List<MetricDefinition> getMetricDefinitions()
      List of metric definition objects.

      Each object specifies the metric name and regular expressions used to parse algorithm logs.

      Default: - No metrics

    • getTrainingImage

      @Stability(Stable) @Nullable default DockerImage getTrainingImage()
      Registry path of the Docker image that contains the training algorithm.

      Default: - No Docker image is specified

    • getTrainingInputMode

      @Stability(Stable) @Nullable default InputMode getTrainingInputMode()
      Input mode that the algorithm supports.

      Default: 'File' mode

    • builder

      @Stability(Stable) static AlgorithmSpecification.Builder builder()
      Returns:
      a AlgorithmSpecification.Builder of AlgorithmSpecification