Interface ISageMakerCreateTrainingJobProps
Properties for creating an Amazon SageMaker training job.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ISageMakerCreateTrainingJobProps : ITaskStateBaseProps
Syntax (vb)
Public Interface ISageMakerCreateTrainingJobProps
Inherits ITaskStateBaseProps
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", "mybucket"), "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
AlgorithmSpecification | Identifies the training algorithm to use. |
EnableNetworkIsolation | Isolates the training container. |
Environment | Environment variables to set in the Docker container. |
Hyperparameters | Algorithm-specific parameters that influence the quality of the model. |
InputDataConfig | Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored. |
OutputDataConfig | Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training. |
ResourceConfig | Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training. |
Role | Role for the Training Job. |
StoppingCondition | Sets a time limit for training. |
Tags | Tags to be applied to the train job. |
TrainingJobName | Training Job Name. |
VpcConfig | Specifies the VPC that you want your training job to connect to. |
Properties
AlgorithmSpecification
Identifies the training algorithm to use.
IAlgorithmSpecification AlgorithmSpecification { get; }
Property Value
EnableNetworkIsolation
Isolates the training container.
virtual Nullable<bool> EnableNetworkIsolation { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
No inbound or outbound network calls can be made to or from the training container.
Default: false
Environment
Environment variables to set in the Docker container.
virtual IDictionary<string, string> Environment { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - No environment variables
Hyperparameters
Algorithm-specific parameters that influence the quality of the model.
virtual IDictionary<string, object> Hyperparameters { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
Set hyperparameters before you start the learning process. For a list of hyperparameters provided by Amazon SageMaker
Default: - No hyperparameters
See: https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
InputDataConfig
Describes the various datasets (e.g. train, validation, test) and the Amazon S3 location where stored.
IChannel[] InputDataConfig { get; }
Property Value
IChannel[]
OutputDataConfig
Identifies the Amazon S3 location where you want Amazon SageMaker to save the results of model training.
IOutputDataConfig OutputDataConfig { get; }
Property Value
ResourceConfig
Specifies the resources, ML compute instances, and ML storage volumes to deploy for model training.
virtual IResourceConfig ResourceConfig { get; }
Property Value
Remarks
Default: - 1 instance of EC2 M4.XLarge
with 10GB
volume
Role
Role for the Training Job.
virtual IRole Role { get; }
Property Value
Remarks
The role must be granted all necessary permissions for the SageMaker training job to be able to operate.
Default: - a role will be created.
StoppingCondition
Sets a time limit for training.
virtual IStoppingCondition StoppingCondition { get; }
Property Value
Remarks
Default: - max runtime of 1 hour
Tags
Tags to be applied to the train job.
virtual IDictionary<string, string> Tags { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - No tags
TrainingJobName
Training Job Name.
string TrainingJobName { get; }
Property Value
System.String
VpcConfig
Specifies the VPC that you want your training job to connect to.
virtual IVpcConfig VpcConfig { get; }
Property Value
Remarks
Default: - No VPC