#[non_exhaustive]pub struct CometInstance {
pub prediction: Option<String>,
pub reference: Option<String>,
pub source: Option<String>,
/* private fields */
}Available on crate feature
evaluation-service only.Expand description
Spec for Comet instance - The fields used for evaluation are dependent on the comet version.
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.prediction: Option<String>Required. Output of the evaluated model.
reference: Option<String>Optional. Ground truth used to compare against the prediction.
source: Option<String>Optional. Source text in original language.
Implementations§
Source§impl CometInstance
impl CometInstance
pub fn new() -> Self
Sourcepub fn set_prediction<T>(self, v: T) -> Self
pub fn set_prediction<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_prediction<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_prediction<T>(self, v: Option<T>) -> Self
Sets or clears the value of prediction.
§Example
ⓘ
let x = CometInstance::new().set_or_clear_prediction(Some("example"));
let x = CometInstance::new().set_or_clear_prediction(None::<String>);Sourcepub fn set_reference<T>(self, v: T) -> Self
pub fn set_reference<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_reference<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_reference<T>(self, v: Option<T>) -> Self
Sourcepub fn set_source<T>(self, v: T) -> Self
pub fn set_source<T>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for CometInstance
impl Clone for CometInstance
Source§fn clone(&self) -> CometInstance
fn clone(&self) -> CometInstance
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 CometInstance
impl Debug for CometInstance
Source§impl Default for CometInstance
impl Default for CometInstance
Source§fn default() -> CometInstance
fn default() -> CometInstance
Returns the “default value” for a type. Read more
Source§impl Message for CometInstance
impl Message for CometInstance
Source§impl PartialEq for CometInstance
impl PartialEq for CometInstance
impl StructuralPartialEq for CometInstance
Auto Trait Implementations§
impl Freeze for CometInstance
impl RefUnwindSafe for CometInstance
impl Send for CometInstance
impl Sync for CometInstance
impl Unpin for CometInstance
impl UnwindSafe for CometInstance
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