Interface IAlgorithmSpecification
Specify the training algorithm and algorithm-specific metadata.
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IAlgorithmSpecification
Syntax (vb)
Public Interface IAlgorithmSpecification
Remarks
ExampleMetadata: infused
Examples
new SageMakerCreateTrainingJob(this, "TrainSagemaker", new SageMakerCreateTrainingJobProps {
TrainingJobName = JsonPath.StringAt("$.JobName"),
AlgorithmSpecification = new AlgorithmSpecification {
AlgorithmName = "BlazingText",
TrainingInputMode = InputMode.FILE
},
InputDataConfig = new [] { new Channel {
ChannelName = "train",
DataSource = new DataSource {
S3DataSource = new S3DataSource {
S3DataType = S3DataType.S3_PREFIX,
S3Location = S3Location.FromJsonExpression("$.S3Bucket")
}
}
} },
OutputDataConfig = new OutputDataConfig {
S3OutputLocation = S3Location.FromBucket(Bucket.FromBucketName(this, "Bucket", "amzn-s3-demo-bucket"), "myoutputpath")
},
ResourceConfig = new ResourceConfig {
InstanceCount = 1,
InstanceType = new InstanceType(JsonPath.StringAt("$.InstanceType")),
VolumeSize = Size.Gibibytes(50)
}, // optional: default is 1 instance of EC2 `M4.XLarge` with `10GB` volume
StoppingCondition = new StoppingCondition {
MaxRuntime = Duration.Hours(2)
}
});
Synopsis
Properties
Algorithm |
Name of the algorithm resource to use for the training job. |
Metric |
List of metric definition objects. |
Training |
Registry path of the Docker image that contains the training algorithm. |
Training |
Input mode that the algorithm supports. |
Properties
AlgorithmName
Name of the algorithm resource to use for the training job.
virtual string AlgorithmName { get; }
Property Value
System.
Remarks
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
MetricDefinitions
List of metric definition objects.
virtual IMetricDefinition[] MetricDefinitions { get; }
Property Value
Remarks
Each object specifies the metric name and regular expressions used to parse algorithm logs.
Default: - No metrics
TrainingImage
Registry path of the Docker image that contains the training algorithm.
virtual DockerImage TrainingImage { get; }
Property Value
Remarks
Default: - No Docker image is specified
TrainingInputMode
Input mode that the algorithm supports.
virtual Nullable<InputMode> TrainingInputMode { get; }
Property Value
System.
Remarks
Default: 'File' mode