AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateTrainingJobInput

import "github.com/aws/aws-sdk-go/service/sagemaker"

type CreateTrainingJobInput struct { AlgorithmSpecification *AlgorithmSpecification `type:"structure" required:"true"` EnableInterContainerTrafficEncryption *bool `type:"boolean"` EnableNetworkIsolation *bool `type:"boolean"` HyperParameters map[string]*string `type:"map"` InputDataConfig []*Channel `min:"1" type:"list"` OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` ResourceConfig *ResourceConfig `type:"structure" required:"true"` RoleArn *string `min:"20" type:"string" required:"true"` StoppingCondition *StoppingCondition `type:"structure" required:"true"` Tags []*Tag `type:"list"` TrainingJobName *string `min:"1" type:"string" required:"true"` VpcConfig *VpcConfig `type:"structure"` }

AlgorithmSpecification

Specifies the training algorithm to use in a CreateTrainingJob (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html) request.

For more information about algorithms provided by Amazon SageMaker, see Algorithms (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). For information about using your own algorithms, see Using Your Own Algorithms with Amazon SageMaker (https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html).

EnableInterContainerTrafficEncryption

Type: *bool

To encrypt all communications between ML compute instances in distributed training, choose True,. Encryption provides greater security for distributed training, but training can take longer because of additional communications between ML compute instances.

EnableNetworkIsolation

Type: *bool

Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If you enable network isolation for training jobs that are configured to use a VPC, Amazon SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.

The Semantic Segmentation built-in algorithm does not support network isolation.

HyperParameters

Type: map[string]*string

Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by Amazon SageMaker, see Algorithms (https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html).

You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the Length Constraint.

InputDataConfig

A channel is a named input source that training algorithms can consume.

OutputDataConfig

Provides information about how to store model training results (model artifacts).

ResourceConfig

Describes the resources, including ML compute instances and ML storage volumes, to use for model training.

RoleArn

Type: *string

The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

During model training, Amazon SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see Amazon SageMaker Roles (https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html).

To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

RoleArn is a required field

StoppingCondition

Specifies how long model training can run. When model training reaches the limit, Amazon SageMaker ends the training job. Use this API to cap model training cost.

To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which delays job termination for120 seconds. Algorithms might use this 120-second window to save the model artifacts, so the results of training is not lost.

Training algorithms provided by Amazon SageMaker automatically saves the intermediate results of a model training job (it is best effort case, as model might not be ready to save as some stages, for example training just started). This intermediate data is a valid model artifact. You can use it to create a model (CreateModel).

Tags

Describes a tag.

TrainingJobName

Type: *string

The name of the training job. The name must be unique within an AWS Region in an AWS account.

TrainingJobName is a required field

VpcConfig

Specifies a VPC that your training jobs and hosted models have access to. Control access to and from your training and model containers by configuring the VPC. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud (https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html) and Protect Training Jobs by Using an Amazon Virtual Private Cloud (https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html).

Method

GoString

func (s CreateTrainingJobInput) GoString() string

GoString returns the string representation

SetAlgorithmSpecification

func (s *CreateTrainingJobInput) SetAlgorithmSpecification(v *AlgorithmSpecification) *CreateTrainingJobInput

SetAlgorithmSpecification sets the AlgorithmSpecification field's value.

SetEnableInterContainerTrafficEncryption

func (s *CreateTrainingJobInput) SetEnableInterContainerTrafficEncryption(v bool) *CreateTrainingJobInput

SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value.

SetEnableNetworkIsolation

func (s *CreateTrainingJobInput) SetEnableNetworkIsolation(v bool) *CreateTrainingJobInput

SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value.

SetHyperParameters

func (s *CreateTrainingJobInput) SetHyperParameters(v map[string]*string) *CreateTrainingJobInput

SetHyperParameters sets the HyperParameters field's value.

SetInputDataConfig

func (s *CreateTrainingJobInput) SetInputDataConfig(v []*Channel) *CreateTrainingJobInput

SetInputDataConfig sets the InputDataConfig field's value.

SetOutputDataConfig

func (s *CreateTrainingJobInput) SetOutputDataConfig(v *OutputDataConfig) *CreateTrainingJobInput

SetOutputDataConfig sets the OutputDataConfig field's value.

SetResourceConfig

func (s *CreateTrainingJobInput) SetResourceConfig(v *ResourceConfig) *CreateTrainingJobInput

SetResourceConfig sets the ResourceConfig field's value.

SetRoleArn

func (s *CreateTrainingJobInput) SetRoleArn(v string) *CreateTrainingJobInput

SetRoleArn sets the RoleArn field's value.

SetStoppingCondition

func (s *CreateTrainingJobInput) SetStoppingCondition(v *StoppingCondition) *CreateTrainingJobInput

SetStoppingCondition sets the StoppingCondition field's value.

SetTags

func (s *CreateTrainingJobInput) SetTags(v []*Tag) *CreateTrainingJobInput

SetTags sets the Tags field's value.

SetTrainingJobName

func (s *CreateTrainingJobInput) SetTrainingJobName(v string) *CreateTrainingJobInput

SetTrainingJobName sets the TrainingJobName field's value.

SetVpcConfig

func (s *CreateTrainingJobInput) SetVpcConfig(v *VpcConfig) *CreateTrainingJobInput

SetVpcConfig sets the VpcConfig field's value.

String

func (s CreateTrainingJobInput) String() string

String returns the string representation

Validate

func (s *CreateTrainingJobInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: