Interface StoppingCondition
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
StoppingCondition.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:48.243Z")
@Stability(Stable)
public interface StoppingCondition
extends software.amazon.jsii.JsiiSerializable
Specifies a limit to how long a model training job can run.
When the job reaches the time limit, Amazon SageMaker ends the 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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forStoppingCondition
static final class
An implementation forStoppingCondition
-
Method Summary
Modifier and TypeMethodDescriptionstatic StoppingCondition.Builder
builder()
default Duration
The maximum length of time, in seconds, that the training or compilation job can run.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMaxRuntime
The maximum length of time, in seconds, that the training or compilation job can run.Default: - 1 hour
-
builder
- Returns:
- a
StoppingCondition.Builder
ofStoppingCondition
-