View a markdown version of this page

AWS::SageMaker::Algorithm MetricDefinition - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.

AWS::SageMaker::Algorithm MetricDefinition

Specifies a metric that the training algorithm writes to stderr or stdout. You can view these logs to understand how your training job performs and check for any errors encountered during training. SageMaker hyperparameter tuning captures all defined metrics. Specify one of the defined metrics to use as an objective metric using the TuningObjective parameter in the HyperParameterTrainingJobDefinition API to evaluate job performance during hyperparameter tuning.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Name" : String, "Regex" : String }

YAML

Name: String Regex: String

Properties

Name

The name of the metric.

Required: Yes

Type: String

Pattern: ^.+$

Minimum: 1

Maximum: 255

Update requires: Replacement

Regex

A regular expression that searches the output of a training job and gets the value of the metric. For more information about using regular expressions to define metrics, see Defining metrics and environment variables.

Required: Yes

Type: String

Pattern: ^.+$

Minimum: 1

Maximum: 500

Update requires: Replacement