Skip to content

/AWS1/CL_SGMALGORITHMSPEC

Specifies the training algorithm to use in a CreateTrainingJob request.

SageMaker uses its own SageMaker account credentials to pull and access built-in algorithms so built-in algorithms are universally accessible across all Amazon Web Services accounts. As a result, built-in algorithms have standard, unrestricted access. You cannot restrict built-in algorithms using IAM roles. Use custom algorithms if you require specific access controls.

For more information about algorithms provided by SageMaker, see Algorithms. For information about using your own algorithms, see Using Your Own Algorithms with Amazon SageMaker.

CONSTRUCTOR

IMPORTING

Required arguments:

iv_traininginputmode TYPE /AWS1/SGMTRAININGINPUTMODE /AWS1/SGMTRAININGINPUTMODE

The training input mode that the algorithm supports. For more information about input modes, see Algorithms.

Pipe mode

If an algorithm supports Pipe mode, Amazon SageMaker streams data directly from Amazon S3 to the container.

File mode

If an algorithm supports File mode, SageMaker downloads the training data from S3 to the provisioned ML storage volume, and mounts the directory to the Docker volume for the training container.

You must provision the ML storage volume with sufficient capacity to accommodate the data downloaded from S3. In addition to the training data, the ML storage volume also stores the output model. The algorithm container uses the ML storage volume to also store intermediate information, if any.

For distributed algorithms, training data is distributed uniformly. Your training duration is predictable if the input data objects sizes are approximately the same. SageMaker does not split the files any further for model training. If the object sizes are skewed, training won't be optimal as the data distribution is also skewed when one host in a training cluster is overloaded, thus becoming a bottleneck in training.

FastFile mode

If an algorithm supports FastFile mode, SageMaker streams data directly from S3 to the container with no code changes, and provides file system access to the data. Users can author their training script to interact with these files as if they were stored on disk.

FastFile mode works best when the data is read sequentially. Augmented manifest files aren't supported. The startup time is lower when there are fewer files in the S3 bucket provided.

Optional arguments:

iv_trainingimage TYPE /AWS1/SGMALGORITHMIMAGE /AWS1/SGMALGORITHMIMAGE

The registry path of the Docker image that contains the training algorithm. For information about docker registry paths for SageMaker built-in algorithms, see Docker Registry Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information about using your custom training container, see Using Your Own Algorithms with Amazon SageMaker.

You must specify either the algorithm name to the AlgorithmName parameter or the image URI of the algorithm container to the TrainingImage parameter.

For more information, see the note in the AlgorithmName parameter description.

iv_algorithmname TYPE /AWS1/SGMARNORNAME /AWS1/SGMARNORNAME

The name of the algorithm resource to use for the training job. This must be an algorithm resource that you created or subscribe to on Amazon Web Services Marketplace.

You must specify either the algorithm name to the AlgorithmName parameter or the image URI of the algorithm container to the TrainingImage parameter.

Note that the AlgorithmName parameter is mutually exclusive with the TrainingImage parameter. If you specify a value for the AlgorithmName parameter, you can't specify a value for TrainingImage, and vice versa.

If you specify values for both parameters, the training job might break; if you don't specify any value for both parameters, the training job might raise a null error.

it_metricdefinitions TYPE /AWS1/CL_SGMMETRICDEFINITION=>TT_METRICDEFINITIONLIST TT_METRICDEFINITIONLIST

A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.

iv_enablesmmetricstimeseries TYPE /AWS1/SGMBOOLEAN /AWS1/SGMBOOLEAN

To generate and save time-series metrics during training, set to true. The default is false and time-series metrics aren't generated except in the following cases:

it_containerentrypoint TYPE /AWS1/CL_SGMTRNCONTAINERENTP00=>TT_TRAININGCONTAINERENTRYPOINT TT_TRAININGCONTAINERENTRYPOINT

The entrypoint script for a Docker container used to run a training job. This script takes precedence over the default train processing instructions. See How Amazon SageMaker Runs Your Training Image for more information.

it_containerarguments TYPE /AWS1/CL_SGMTRNCONTAINERARGU00=>TT_TRAININGCONTAINERARGUMENTS TT_TRAININGCONTAINERARGUMENTS

The arguments for a container used to run a training job. See How Amazon SageMaker Runs Your Training Image for additional information.

io_trainingimageconfig TYPE REF TO /AWS1/CL_SGMTRNIMAGECONFIG /AWS1/CL_SGMTRNIMAGECONFIG

The configuration to use an image from a private Docker registry for a training job.


Queryable Attributes

TrainingImage

The registry path of the Docker image that contains the training algorithm. For information about docker registry paths for SageMaker built-in algorithms, see Docker Registry Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information about using your custom training container, see Using Your Own Algorithms with Amazon SageMaker.

You must specify either the algorithm name to the AlgorithmName parameter or the image URI of the algorithm container to the TrainingImage parameter.

For more information, see the note in the AlgorithmName parameter description.

Accessible with the following methods

Method Description
GET_TRAININGIMAGE() Getter for TRAININGIMAGE, with configurable default
ASK_TRAININGIMAGE() Getter for TRAININGIMAGE w/ exceptions if field has no value
HAS_TRAININGIMAGE() Determine if TRAININGIMAGE has a value

AlgorithmName

The name of the algorithm resource to use for the training job. This must be an algorithm resource that you created or subscribe to on Amazon Web Services Marketplace.

You must specify either the algorithm name to the AlgorithmName parameter or the image URI of the algorithm container to the TrainingImage parameter.

Note that the AlgorithmName parameter is mutually exclusive with the TrainingImage parameter. If you specify a value for the AlgorithmName parameter, you can't specify a value for TrainingImage, and vice versa.

If you specify values for both parameters, the training job might break; if you don't specify any value for both parameters, the training job might raise a null error.

Accessible with the following methods

Method Description
GET_ALGORITHMNAME() Getter for ALGORITHMNAME, with configurable default
ASK_ALGORITHMNAME() Getter for ALGORITHMNAME w/ exceptions if field has no value
HAS_ALGORITHMNAME() Determine if ALGORITHMNAME has a value

TrainingInputMode

The training input mode that the algorithm supports. For more information about input modes, see Algorithms.

Pipe mode

If an algorithm supports Pipe mode, Amazon SageMaker streams data directly from Amazon S3 to the container.

File mode

If an algorithm supports File mode, SageMaker downloads the training data from S3 to the provisioned ML storage volume, and mounts the directory to the Docker volume for the training container.

You must provision the ML storage volume with sufficient capacity to accommodate the data downloaded from S3. In addition to the training data, the ML storage volume also stores the output model. The algorithm container uses the ML storage volume to also store intermediate information, if any.

For distributed algorithms, training data is distributed uniformly. Your training duration is predictable if the input data objects sizes are approximately the same. SageMaker does not split the files any further for model training. If the object sizes are skewed, training won't be optimal as the data distribution is also skewed when one host in a training cluster is overloaded, thus becoming a bottleneck in training.

FastFile mode

If an algorithm supports FastFile mode, SageMaker streams data directly from S3 to the container with no code changes, and provides file system access to the data. Users can author their training script to interact with these files as if they were stored on disk.

FastFile mode works best when the data is read sequentially. Augmented manifest files aren't supported. The startup time is lower when there are fewer files in the S3 bucket provided.

Accessible with the following methods

Method Description
GET_TRAININGINPUTMODE() Getter for TRAININGINPUTMODE, with configurable default
ASK_TRAININGINPUTMODE() Getter for TRAININGINPUTMODE w/ exceptions if field has no v
HAS_TRAININGINPUTMODE() Determine if TRAININGINPUTMODE has a value

MetricDefinitions

A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse algorithm logs. SageMaker publishes each metric to Amazon CloudWatch.

Accessible with the following methods

Method Description
GET_METRICDEFINITIONS() Getter for METRICDEFINITIONS, with configurable default
ASK_METRICDEFINITIONS() Getter for METRICDEFINITIONS w/ exceptions if field has no v
HAS_METRICDEFINITIONS() Determine if METRICDEFINITIONS has a value

EnableSageMakerMetricsTimeSeries

To generate and save time-series metrics during training, set to true. The default is false and time-series metrics aren't generated except in the following cases:

Accessible with the following methods

Method Description
GET_ENABLESMMETTIMESERIES() Getter for ENABLESMMETRICSTIMESERIES, with configurable defa
ASK_ENABLESMMETTIMESERIES() Getter for ENABLESMMETRICSTIMESERIES w/ exceptions if field
HAS_ENABLESMMETTIMESERIES() Determine if ENABLESMMETRICSTIMESERIES has a value

ContainerEntrypoint

The entrypoint script for a Docker container used to run a training job. This script takes precedence over the default train processing instructions. See How Amazon SageMaker Runs Your Training Image for more information.

Accessible with the following methods

Method Description
GET_CONTAINERENTRYPOINT() Getter for CONTAINERENTRYPOINT, with configurable default
ASK_CONTAINERENTRYPOINT() Getter for CONTAINERENTRYPOINT w/ exceptions if field has no
HAS_CONTAINERENTRYPOINT() Determine if CONTAINERENTRYPOINT has a value

ContainerArguments

The arguments for a container used to run a training job. See How Amazon SageMaker Runs Your Training Image for additional information.

Accessible with the following methods

Method Description
GET_CONTAINERARGUMENTS() Getter for CONTAINERARGUMENTS, with configurable default
ASK_CONTAINERARGUMENTS() Getter for CONTAINERARGUMENTS w/ exceptions if field has no
HAS_CONTAINERARGUMENTS() Determine if CONTAINERARGUMENTS has a value

TrainingImageConfig

The configuration to use an image from a private Docker registry for a training job.

Accessible with the following methods

Method Description
GET_TRAININGIMAGECONFIG() Getter for TRAININGIMAGECONFIG