Skip to main content

Evaluator

Trait Evaluator 

Source
pub trait Evaluator: Send + Sync {
    // Required methods
    fn eval<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        input: &'life1 str,
        prediction: &'life2 str,
        reference: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<Score, EvalError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn name(&self) -> &str;
}
Expand description

Evaluator trait

Required Methods§

Source

fn eval<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, input: &'life1 str, prediction: &'life2 str, reference: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Score, EvalError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Scores a single prediction

Source

fn name(&self) -> &str

Evaluator name (used in report summaries)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§