AWS SDK for C++

AWS SDK for C++ Version 1.11.925

Loading...
Searching...
No Matches
ForwardResult.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/sagemakertrainingsessionruntime/SageMakerTrainingSessionRuntime_EXPORTS.h>
11#include <aws/sagemakertrainingsessionruntime/model/TensorData.h>
12#include <aws/sagemakertrainingsessionruntime/model/TrainingTokenUsage.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace SageMakerTrainingSessionRuntime {
24namespace Model {
25
33 public:
34 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API ForwardResult() = default;
35 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API ForwardResult(Aws::Utils::Json::JsonView jsonValue);
36 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API ForwardResult& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetLossFnOutputType() const { return m_lossFnOutputType; }
44 inline bool LossFnOutputTypeHasBeenSet() const { return m_lossFnOutputTypeHasBeenSet; }
45 template <typename LossFnOutputTypeT = Aws::String>
46 void SetLossFnOutputType(LossFnOutputTypeT&& value) {
47 m_lossFnOutputTypeHasBeenSet = true;
48 m_lossFnOutputType = std::forward<LossFnOutputTypeT>(value);
49 }
50 template <typename LossFnOutputTypeT = Aws::String>
51 ForwardResult& WithLossFnOutputType(LossFnOutputTypeT&& value) {
52 SetLossFnOutputType(std::forward<LossFnOutputTypeT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::Vector<Aws::Map<Aws::String, TensorData>>& GetLossFnOutputs() const { return m_lossFnOutputs; }
62 inline bool LossFnOutputsHasBeenSet() const { return m_lossFnOutputsHasBeenSet; }
63 template <typename LossFnOutputsT = Aws::Vector<Aws::Map<Aws::String, TensorData>>>
64 void SetLossFnOutputs(LossFnOutputsT&& value) {
65 m_lossFnOutputsHasBeenSet = true;
66 m_lossFnOutputs = std::forward<LossFnOutputsT>(value);
67 }
68 template <typename LossFnOutputsT = Aws::Vector<Aws::Map<Aws::String, TensorData>>>
69 ForwardResult& WithLossFnOutputs(LossFnOutputsT&& value) {
70 SetLossFnOutputs(std::forward<LossFnOutputsT>(value));
71 return *this;
72 }
73 template <typename LossFnOutputsT = Aws::Map<Aws::String, TensorData>>
74 ForwardResult& AddLossFnOutputs(LossFnOutputsT&& value) {
75 m_lossFnOutputsHasBeenSet = true;
76 m_lossFnOutputs.emplace_back(std::forward<LossFnOutputsT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::Map<Aws::String, double>& GetMetrics() const { return m_metrics; }
86 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
87 template <typename MetricsT = Aws::Map<Aws::String, double>>
88 void SetMetrics(MetricsT&& value) {
89 m_metricsHasBeenSet = true;
90 m_metrics = std::forward<MetricsT>(value);
91 }
92 template <typename MetricsT = Aws::Map<Aws::String, double>>
93 ForwardResult& WithMetrics(MetricsT&& value) {
94 SetMetrics(std::forward<MetricsT>(value));
95 return *this;
96 }
97 inline ForwardResult& AddMetrics(Aws::String key, double value) {
98 m_metricsHasBeenSet = true;
99 m_metrics.emplace(key, value);
100 return *this;
101 }
103
105
108 inline const TrainingTokenUsage& GetTokenUsage() const { return m_tokenUsage; }
109 inline bool TokenUsageHasBeenSet() const { return m_tokenUsageHasBeenSet; }
110 template <typename TokenUsageT = TrainingTokenUsage>
111 void SetTokenUsage(TokenUsageT&& value) {
112 m_tokenUsageHasBeenSet = true;
113 m_tokenUsage = std::forward<TokenUsageT>(value);
114 }
115 template <typename TokenUsageT = TrainingTokenUsage>
116 ForwardResult& WithTokenUsage(TokenUsageT&& value) {
117 SetTokenUsage(std::forward<TokenUsageT>(value));
118 return *this;
119 }
121 private:
122 Aws::String m_lossFnOutputType;
123
125
127
128 TrainingTokenUsage m_tokenUsage;
129 bool m_lossFnOutputTypeHasBeenSet = false;
130 bool m_lossFnOutputsHasBeenSet = false;
131 bool m_metricsHasBeenSet = false;
132 bool m_tokenUsageHasBeenSet = false;
133};
134
135} // namespace Model
136} // namespace SageMakerTrainingSessionRuntime
137} // namespace Aws
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API ForwardResult & operator=(Aws::Utils::Json::JsonView jsonValue)
ForwardResult & AddLossFnOutputs(LossFnOutputsT &&value)
const Aws::Map< Aws::String, double > & GetMetrics() const
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API ForwardResult()=default
const Aws::Vector< Aws::Map< Aws::String, TensorData > > & GetLossFnOutputs() const
ForwardResult & WithLossFnOutputs(LossFnOutputsT &&value)
ForwardResult & WithTokenUsage(TokenUsageT &&value)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API ForwardResult(Aws::Utils::Json::JsonView jsonValue)
ForwardResult & AddMetrics(Aws::String key, double value)
ForwardResult & WithLossFnOutputType(LossFnOutputTypeT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue