Skip to content

AlgorithmSpecification

Source code in docs_src/capo_sagemaker/types/algorithm_specification.py
class AlgorithmSpecification(TypedDict, closed=True):
    training_image: NotRequired["capo_sagemaker.types.algorithm_image.AlgorithmImage"]
    """<p>The registry path of the Docker image that contains the training algorithm. For information about docker registry paths for SageMaker built-in algorithms, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html">Docker Registry Paths and Example Code</a> in the <i>Amazon SageMaker developer guide</i>. SageMaker supports both <code>registry/repository[:tag]</code> and <code>registry/repository[@digest]</code> image path formats. For more information about using your custom training container, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using Your Own Algorithms with Amazon SageMaker</a>.</p> <note> <p>You must specify either the algorithm name to the <code>AlgorithmName</code> parameter or the image URI of the algorithm container to the <code>TrainingImage</code> parameter.</p> <p>For more information, see the note in the <code>AlgorithmName</code> parameter description.</p> </note>"""
    algorithm_name: NotRequired["capo_sagemaker.types.arn_or_name.ArnOrName"]
    """<p>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.</p> <note> <p>You must specify either the algorithm name to the <code>AlgorithmName</code> parameter or the image URI of the algorithm container to the <code>TrainingImage</code> parameter.</p> <p>Note that the <code>AlgorithmName</code> parameter is mutually exclusive with the <code>TrainingImage</code> parameter. If you specify a value for the <code>AlgorithmName</code> parameter, you can't specify a value for <code>TrainingImage</code>, and vice versa.</p> <p>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 <code>null</code> error.</p> </note>"""
    training_input_mode: NotRequired[
        "capo_sagemaker.types.training_input_mode.TrainingInputMode"
    ]
    metric_definitions: NotRequired[
        "capo_sagemaker.types.metric_definition_list.MetricDefinitionList"
    ]
    """<p>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.</p>"""
    enable_sage_maker_metrics_time_series: NotRequired[
        "capo_sagemaker.types.boolean.Boolean"
    ]
    """<p>To generate and save time-series metrics during training, set to <code>true</code>. The default is <code>false</code> and time-series metrics aren't generated except in the following cases:</p> <ul> <li> <p>You use one of the SageMaker built-in algorithms</p> </li> <li> <p>You use one of the following <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/pre-built-containers-frameworks-deep-learning.html">Prebuilt SageMaker Docker Images</a>:</p> <ul> <li> <p>Tensorflow (version &gt;= 1.15)</p> </li> <li> <p>MXNet (version &gt;= 1.6)</p> </li> <li> <p>PyTorch (version &gt;= 1.3)</p> </li> </ul> </li> <li> <p>You specify at least one <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_MetricDefinition.html">MetricDefinition</a> </p> </li> </ul>"""
    container_entrypoint: NotRequired[
        "capo_sagemaker.types.training_container_entrypoint.TrainingContainerEntrypoint"
    ]
    """<p>The <a href="https://docs.docker.com/engine/reference/builder/">entrypoint script for a Docker container</a> used to run a training job. This script takes precedence over the default train processing instructions. See <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-training-algo-dockerfile.html">How Amazon SageMaker Runs Your Training Image</a> for more information.</p>"""
    container_arguments: NotRequired[
        "capo_sagemaker.types.training_container_arguments.TrainingContainerArguments"
    ]
    """<p>The arguments for a container used to run a training job. See <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-training-algo-dockerfile.html">How Amazon SageMaker Runs Your Training Image</a> for additional information.</p>"""
    training_image_config: NotRequired[
        "capo_sagemaker.types.training_image_config.TrainingImageConfig"
    ]
    """<p>The configuration to use an image from a private Docker registry for a training job.</p>"""

algorithm_name instance-attribute

algorithm_name: NotRequired[ArnOrName]

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.

container_arguments instance-attribute

container_arguments: NotRequired[TrainingContainerArguments]

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

container_entrypoint instance-attribute

container_entrypoint: NotRequired[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.

enable_sage_maker_metrics_time_series instance-attribute

enable_sage_maker_metrics_time_series: NotRequired[Boolean]

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:

metric_definitions instance-attribute

metric_definitions: NotRequired[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.

training_image instance-attribute

training_image: NotRequired[AlgorithmImage]

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.

training_image_config instance-attribute

training_image_config: NotRequired[TrainingImageConfig]

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

training_input_mode instance-attribute

training_input_mode: NotRequired[TrainingInputMode]