pub struct EvalRunner { /* private fields */ }Expand description
Batch runner: holds both pointwise and pairwise evaluators.
Implementations§
Source§impl EvalRunner
impl EvalRunner
Sourcepub fn new(evaluators: Vec<Box<dyn Evaluator>>) -> Self
pub fn new(evaluators: Vec<Box<dyn Evaluator>>) -> Self
Creates a batch runner (pointwise evaluators only).
Sourcepub fn with_pairwise(self, pairwise: Vec<Box<dyn PairwiseEvaluator>>) -> Self
pub fn with_pairwise(self, pairwise: Vec<Box<dyn PairwiseEvaluator>>) -> Self
Appends pairwise evaluators (P1-1, arena evaluation enters the unified report).
Sourcepub fn with_price_book(self, price_book: PriceBook) -> Self
pub fn with_price_book(self, price_book: PriceBook) -> Self
Overrides the price book used for cost estimation (E1). Takes over the default set.
Sourcepub async fn run(
&self,
dataset: &Dataset,
predictor: &dyn Predictor,
) -> Result<Report, EvalError>
pub async fn run( &self, dataset: &Dataset, predictor: &dyn Predictor, ) -> Result<Report, EvalError>
Runs all evaluators on the dataset, returning the report.
P1-3: per-item tolerance — a failed predict records a "predict" failure and skips the example;
a failed evaluator score records only that evaluator’s failure, others still score.
P1-1: pairwise evaluators participate too, using (prediction, reference) as the A/B candidates
(arena usage: put the answer under comparison in the reference slot).
Auto Trait Implementations§
impl !RefUnwindSafe for EvalRunner
impl !UnwindSafe for EvalRunner
impl Freeze for EvalRunner
impl Send for EvalRunner
impl Sync for EvalRunner
impl Unpin for EvalRunner
impl UnsafeUnpin for EvalRunner
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