#[non_exhaustive]pub struct PredefinedMetricSpec {
pub metric_spec_name: String,
pub metric_spec_parameters: Option<Struct>,
/* private fields */
}Available on crate feature
gen-ai-tuning-service only.Expand description
The spec for a pre-defined metric.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.metric_spec_name: StringRequired. The name of a pre-defined metric, such as “instruction_following_v1” or “text_quality_v1”.
metric_spec_parameters: Option<Struct>Optional. The parameters needed to run the pre-defined metric.
Implementations§
Source§impl PredefinedMetricSpec
impl PredefinedMetricSpec
pub fn new() -> Self
Sourcepub fn set_metric_spec_name<T: Into<String>>(self, v: T) -> Self
pub fn set_metric_spec_name<T: Into<String>>(self, v: T) -> Self
Sets the value of metric_spec_name.
§Example
ⓘ
let x = PredefinedMetricSpec::new().set_metric_spec_name("example");Sourcepub fn set_metric_spec_parameters<T>(self, v: T) -> Self
pub fn set_metric_spec_parameters<T>(self, v: T) -> Self
Sets the value of metric_spec_parameters.
§Example
ⓘ
use wkt::Struct;
let x = PredefinedMetricSpec::new().set_metric_spec_parameters(Struct::default()/* use setters */);Sourcepub fn set_or_clear_metric_spec_parameters<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metric_spec_parameters<T>(self, v: Option<T>) -> Self
Sets or clears the value of metric_spec_parameters.
§Example
ⓘ
use wkt::Struct;
let x = PredefinedMetricSpec::new().set_or_clear_metric_spec_parameters(Some(Struct::default()/* use setters */));
let x = PredefinedMetricSpec::new().set_or_clear_metric_spec_parameters(None::<Struct>);Trait Implementations§
Source§impl Clone for PredefinedMetricSpec
impl Clone for PredefinedMetricSpec
Source§fn clone(&self) -> PredefinedMetricSpec
fn clone(&self) -> PredefinedMetricSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PredefinedMetricSpec
impl Debug for PredefinedMetricSpec
Source§impl Default for PredefinedMetricSpec
impl Default for PredefinedMetricSpec
Source§fn default() -> PredefinedMetricSpec
fn default() -> PredefinedMetricSpec
Returns the “default value” for a type. Read more
Source§impl Message for PredefinedMetricSpec
impl Message for PredefinedMetricSpec
Source§impl PartialEq for PredefinedMetricSpec
impl PartialEq for PredefinedMetricSpec
impl StructuralPartialEq for PredefinedMetricSpec
Auto Trait Implementations§
impl Freeze for PredefinedMetricSpec
impl RefUnwindSafe for PredefinedMetricSpec
impl Send for PredefinedMetricSpec
impl Sync for PredefinedMetricSpec
impl Unpin for PredefinedMetricSpec
impl UnsafeUnpin for PredefinedMetricSpec
impl UnwindSafe for PredefinedMetricSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more