Interface SageMakerCreateTrainingJobProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
All Known Implementing Classes:
SageMakerCreateTrainingJobProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:38.173Z") @Stability(Stable) public interface SageMakerCreateTrainingJobProps extends software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
Properties for creating an Amazon SageMaker training job.

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

    • getAlgorithmSpecification

      @Stability(Stable) @NotNull AlgorithmSpecification getAlgorithmSpecification()
      Identifies the training algorithm to use.
    • getInputDataConfig

      @Stability(Stable) @NotNull List<Channel> getInputDataConfig()
      Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored.
    • getOutputDataConfig

      @Stability(Stable) @NotNull OutputDataConfig getOutputDataConfig()
      Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.
    • getTrainingJobName

      @Stability(Stable) @NotNull String getTrainingJobName()
      Training Job Name.
    • getEnableNetworkIsolation

      @Stability(Stable) @Nullable default Boolean getEnableNetworkIsolation()
      Isolates the training container.

      No inbound or outbound network calls can be made to or from the training container.

      Default: false

    • getEnvironment

      @Stability(Stable) @Nullable default Map<String,String> getEnvironment()
      Environment variables to set in the Docker container.

      Default: - No environment variables

    • getHyperparameters

      @Stability(Stable) @Nullable default Map<String,Object> getHyperparameters()
      Algorithm-specific parameters that influence the quality of the model.

      Set hyperparameters before you start the learning process. For a list of hyperparameters provided by Amazon SageMaker

      Default: - No hyperparameters

      See Also:
    • getResourceConfig

      @Stability(Stable) @Nullable default ResourceConfig getResourceConfig()
      Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.

      Default: - 1 instance of EC2 `M4.XLarge` with `10GB` volume

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      Role for the Training Job.

      The role must be granted all necessary permissions for the SageMaker training job to be able to operate.

      See https://docs.aws.amazon.com/fr_fr/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createtrainingjob-perms

      Default: - a role will be created.

    • getStoppingCondition

      @Stability(Stable) @Nullable default StoppingCondition getStoppingCondition()
      Sets a time limit for training.

      Default: - max runtime of 1 hour

    • getTags

      @Stability(Stable) @Nullable default Map<String,String> getTags()
      Tags to be applied to the train job.

      Default: - No tags

    • getVpcConfig

      @Stability(Stable) @Nullable default VpcConfig getVpcConfig()
      Specifies the VPC that you want your training job to connect to.

      Default: - No VPC

    • builder

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