Skip to main content

EvaluationScorer

Trait EvaluationScorer 

Source
pub trait EvaluationScorer: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn threshold(&self) -> f64;
    fn score(
        &self,
        case: EvaluationCase,
        output: EvaluationOutput,
    ) -> EvaluationFuture<Result<ScoreValue, EvaluationError>>;
}
Expand description

Asynchronous scorer boundary.

Required Methods§

Source

fn name(&self) -> &str

Stable score name.

Source

fn threshold(&self) -> f64

Per-case passing threshold.

Source

fn score( &self, case: EvaluationCase, output: EvaluationOutput, ) -> EvaluationFuture<Result<ScoreValue, EvaluationError>>

Scores one target output.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§