/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** *

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.

See Also:

* AWS * API Reference

*/ class MetricDefinition { public: AWS_SAGEMAKER_API MetricDefinition(); AWS_SAGEMAKER_API MetricDefinition(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API MetricDefinition& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the metric.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the metric.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the metric.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the metric.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the metric.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the metric.

*/ inline MetricDefinition& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the metric.

*/ inline MetricDefinition& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the metric.

*/ inline MetricDefinition& WithName(const char* value) { SetName(value); return *this;} /** *

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.

*/ inline const Aws::String& GetRegex() const{ return m_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.

*/ inline bool RegexHasBeenSet() const { return m_regexHasBeenSet; } /** *

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.

*/ inline void SetRegex(const Aws::String& value) { m_regexHasBeenSet = true; m_regex = value; } /** *

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.

*/ inline void SetRegex(Aws::String&& value) { m_regexHasBeenSet = true; m_regex = std::move(value); } /** *

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.

*/ inline void SetRegex(const char* value) { m_regexHasBeenSet = true; m_regex.assign(value); } /** *

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.

*/ inline MetricDefinition& WithRegex(const Aws::String& value) { SetRegex(value); return *this;} /** *

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.

*/ inline MetricDefinition& WithRegex(Aws::String&& value) { SetRegex(std::move(value)); return *this;} /** *

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.

*/ inline MetricDefinition& WithRegex(const char* value) { SetRegex(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_regex; bool m_regexHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws