Class SageMakerCreateTrainingJob
Class representing the SageMaker Create Training Job task.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.AWS.StepFunctions.Tasks.dll
Syntax (csharp)
public class SageMakerCreateTrainingJob : TaskStateBase, IConstruct, IDependable, IChainable, INextable, IGrantable, IConnectable
Syntax (vb)
Public Class SageMakerCreateTrainingJob
Inherits TaskStateBase
Implements IConstruct, IDependable, IChainable, INextable, IGrantable, IConnectable
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
Constructors
SageMakerCreateTrainingJob(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SageMakerCreateTrainingJob(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
SageMakerCreateTrainingJob(Construct, String, ISageMakerCreateTrainingJobProps) |
Properties
Connections | Allows specify security group connections for instances of this fleet. |
GrantPrincipal | The principal to grant permissions to. |
Role | The execution role for the Sagemaker training job. |
TaskMetrics | |
TaskPolicies |
Methods
AddSecurityGroup(ISecurityGroup) | Add the security group to all instances via the launch configuration security groups array. |
Constructors
SageMakerCreateTrainingJob(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SageMakerCreateTrainingJob(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SageMakerCreateTrainingJob(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SageMakerCreateTrainingJob(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
SageMakerCreateTrainingJob(Construct, String, ISageMakerCreateTrainingJobProps)
public SageMakerCreateTrainingJob(Construct scope, string id, ISageMakerCreateTrainingJobProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ISageMakerCreateTrainingJobProps
Properties
Connections
Allows specify security group connections for instances of this fleet.
public virtual Connections_ Connections { get; }
Property Value
GrantPrincipal
The principal to grant permissions to.
public virtual IPrincipal GrantPrincipal { get; }
Property Value
Role
The execution role for the Sagemaker training job.
public virtual IRole Role { get; }
Property Value
Remarks
Only available after task has been added to a state machine.
TaskMetrics
protected override ITaskMetricsConfig TaskMetrics { get; }
Property Value
Overrides
TaskPolicies
protected override PolicyStatement[] TaskPolicies { get; }
Property Value
Overrides
Methods
AddSecurityGroup(ISecurityGroup)
Add the security group to all instances via the launch configuration security groups array.
public virtual void AddSecurityGroup(ISecurityGroup securityGroup)
Parameters
- securityGroup ISecurityGroup
: The security group to add.