Show / Hide Table of Contents

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

AlgorithmName

Name of the algorithm resource to use for the training job.

MetricDefinitions

List of metric definition objects.

TrainingImage

Registry path of the Docker image that contains the training algorithm.

TrainingInputMode

Input mode that the algorithm supports.

Properties

AlgorithmName

Name of the algorithm resource to use for the training job.

string? AlgorithmName { get; }
Property Value

string

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.

IMetricDefinition[]? MetricDefinitions { get; }
Property Value

IMetricDefinition[]

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.

DockerImage? TrainingImage { get; }
Property Value

DockerImage

Remarks

Default: - No Docker image is specified

TrainingInputMode

Input mode that the algorithm supports.

InputMode? TrainingInputMode { get; }
Property Value

InputMode?

Remarks

Default: 'File' mode

Back to top Generated by DocFX