#[non_exhaustive]pub struct AggregationResult {
pub aggregation_metric: AggregationMetric,
pub aggregation_result: Option<AggregationResult>,
/* private fields */
}gen-ai-tuning-service only.Expand description
The aggregation result for a single metric.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.aggregation_metric: AggregationMetricAggregation metric.
aggregation_result: Option<AggregationResult>The aggregation result.
Implementations§
Source§impl AggregationResult
impl AggregationResult
pub fn new() -> Self
Sourcepub fn set_aggregation_metric<T: Into<AggregationMetric>>(self, v: T) -> Self
pub fn set_aggregation_metric<T: Into<AggregationMetric>>(self, v: T) -> Self
Sets the value of aggregation_metric.
§Example
use google_cloud_aiplatform_v1::model::metric::AggregationMetric;
let x0 = AggregationResult::new().set_aggregation_metric(AggregationMetric::Average);
let x1 = AggregationResult::new().set_aggregation_metric(AggregationMetric::Mode);
let x2 = AggregationResult::new().set_aggregation_metric(AggregationMetric::StandardDeviation);Sourcepub fn set_aggregation_result<T: Into<Option<AggregationResult>>>(
self,
v: T,
) -> Self
pub fn set_aggregation_result<T: Into<Option<AggregationResult>>>( self, v: T, ) -> Self
Sets the value of aggregation_result.
Note that all the setters affecting aggregation_result are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::PointwiseMetricResult;
let x = AggregationResult::new().set_aggregation_result(Some(
google_cloud_aiplatform_v1::model::aggregation_result::AggregationResult::PointwiseMetricResult(PointwiseMetricResult::default().into())));Sourcepub fn pointwise_metric_result(&self) -> Option<&Box<PointwiseMetricResult>>
pub fn pointwise_metric_result(&self) -> Option<&Box<PointwiseMetricResult>>
The value of aggregation_result
if it holds a PointwiseMetricResult, None if the field is not set or
holds a different branch.
Sourcepub fn set_pointwise_metric_result<T: Into<Box<PointwiseMetricResult>>>(
self,
v: T,
) -> Self
pub fn set_pointwise_metric_result<T: Into<Box<PointwiseMetricResult>>>( self, v: T, ) -> Self
Sets the value of aggregation_result
to hold a PointwiseMetricResult.
Note that all the setters affecting aggregation_result are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::PointwiseMetricResult;
let x = AggregationResult::new().set_pointwise_metric_result(PointwiseMetricResult::default()/* use setters */);
assert!(x.pointwise_metric_result().is_some());
assert!(x.pairwise_metric_result().is_none());
assert!(x.exact_match_metric_value().is_none());
assert!(x.bleu_metric_value().is_none());
assert!(x.rouge_metric_value().is_none());Sourcepub fn pairwise_metric_result(&self) -> Option<&Box<PairwiseMetricResult>>
pub fn pairwise_metric_result(&self) -> Option<&Box<PairwiseMetricResult>>
The value of aggregation_result
if it holds a PairwiseMetricResult, None if the field is not set or
holds a different branch.
Sourcepub fn set_pairwise_metric_result<T: Into<Box<PairwiseMetricResult>>>(
self,
v: T,
) -> Self
pub fn set_pairwise_metric_result<T: Into<Box<PairwiseMetricResult>>>( self, v: T, ) -> Self
Sets the value of aggregation_result
to hold a PairwiseMetricResult.
Note that all the setters affecting aggregation_result are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::PairwiseMetricResult;
let x = AggregationResult::new().set_pairwise_metric_result(PairwiseMetricResult::default()/* use setters */);
assert!(x.pairwise_metric_result().is_some());
assert!(x.pointwise_metric_result().is_none());
assert!(x.exact_match_metric_value().is_none());
assert!(x.bleu_metric_value().is_none());
assert!(x.rouge_metric_value().is_none());Sourcepub fn exact_match_metric_value(&self) -> Option<&Box<ExactMatchMetricValue>>
pub fn exact_match_metric_value(&self) -> Option<&Box<ExactMatchMetricValue>>
The value of aggregation_result
if it holds a ExactMatchMetricValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_exact_match_metric_value<T: Into<Box<ExactMatchMetricValue>>>(
self,
v: T,
) -> Self
pub fn set_exact_match_metric_value<T: Into<Box<ExactMatchMetricValue>>>( self, v: T, ) -> Self
Sets the value of aggregation_result
to hold a ExactMatchMetricValue.
Note that all the setters affecting aggregation_result are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::ExactMatchMetricValue;
let x = AggregationResult::new().set_exact_match_metric_value(ExactMatchMetricValue::default()/* use setters */);
assert!(x.exact_match_metric_value().is_some());
assert!(x.pointwise_metric_result().is_none());
assert!(x.pairwise_metric_result().is_none());
assert!(x.bleu_metric_value().is_none());
assert!(x.rouge_metric_value().is_none());Sourcepub fn bleu_metric_value(&self) -> Option<&Box<BleuMetricValue>>
pub fn bleu_metric_value(&self) -> Option<&Box<BleuMetricValue>>
The value of aggregation_result
if it holds a BleuMetricValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_bleu_metric_value<T: Into<Box<BleuMetricValue>>>(self, v: T) -> Self
pub fn set_bleu_metric_value<T: Into<Box<BleuMetricValue>>>(self, v: T) -> Self
Sets the value of aggregation_result
to hold a BleuMetricValue.
Note that all the setters affecting aggregation_result are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::BleuMetricValue;
let x = AggregationResult::new().set_bleu_metric_value(BleuMetricValue::default()/* use setters */);
assert!(x.bleu_metric_value().is_some());
assert!(x.pointwise_metric_result().is_none());
assert!(x.pairwise_metric_result().is_none());
assert!(x.exact_match_metric_value().is_none());
assert!(x.rouge_metric_value().is_none());Sourcepub fn rouge_metric_value(&self) -> Option<&Box<RougeMetricValue>>
pub fn rouge_metric_value(&self) -> Option<&Box<RougeMetricValue>>
The value of aggregation_result
if it holds a RougeMetricValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_rouge_metric_value<T: Into<Box<RougeMetricValue>>>(
self,
v: T,
) -> Self
pub fn set_rouge_metric_value<T: Into<Box<RougeMetricValue>>>( self, v: T, ) -> Self
Sets the value of aggregation_result
to hold a RougeMetricValue.
Note that all the setters affecting aggregation_result are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::RougeMetricValue;
let x = AggregationResult::new().set_rouge_metric_value(RougeMetricValue::default()/* use setters */);
assert!(x.rouge_metric_value().is_some());
assert!(x.pointwise_metric_result().is_none());
assert!(x.pairwise_metric_result().is_none());
assert!(x.exact_match_metric_value().is_none());
assert!(x.bleu_metric_value().is_none());Trait Implementations§
Source§impl Clone for AggregationResult
impl Clone for AggregationResult
Source§fn clone(&self) -> AggregationResult
fn clone(&self) -> AggregationResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more