/** * 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 . Amazon SageMakerhyperparameter tuning captures all * defined metrics. You specify one metric that a hyperparameter tuning job uses as * its objective metric to choose the best training job.

See Also:

* AWS * API Reference

*/ class AWS_SAGEMAKER_API MetricDefinition { public: MetricDefinition(); MetricDefinition(Aws::Utils::Json::JsonView jsonValue); MetricDefinition& operator=(Aws::Utils::Json::JsonView jsonValue); 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 * Objective Metrics.

*/ 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 * Objective Metrics.

*/ 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 * Objective Metrics.

*/ 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 * Objective Metrics.

*/ 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 * Objective Metrics.

*/ 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 * Objective Metrics.

*/ 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 * Objective Metrics.

*/ 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 * Objective Metrics.

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