pub struct Evaluator<EC: EvaluatorComponentTypes> {
pub summary: Option<LearnerSummaryConfig>,
/* private fields */
}Expand description
Evaluates a model on a specific dataset.
Fields§
§summary: Option<LearnerSummaryConfig>Config for creating a summary of the evaluation
Implementations§
Source§impl<EC: EvaluatorComponentTypes> Evaluator<EC>
impl<EC: EvaluatorComponentTypes> Evaluator<EC>
Sourcepub fn eval<S: Display>(
self,
name: S,
dataloader: Arc<dyn DataLoader<<<EC as EvaluatorComponentTypes>::Model as InferenceStep>::Input>>,
) -> EvaluationResult
pub fn eval<S: Display>( self, name: S, dataloader: Arc<dyn DataLoader<<<EC as EvaluatorComponentTypes>::Model as InferenceStep>::Input>>, ) -> EvaluationResult
Run the evaluation on the given dataset.
The data will be stored and displayed under the provided name.
Sourcepub fn eval_all<S: Display>(
self,
splits: impl IntoIterator<Item = (S, Arc<dyn DataLoader<<<EC as EvaluatorComponentTypes>::Model as InferenceStep>::Input>>)>,
) -> EvaluationResult
pub fn eval_all<S: Display>( self, splits: impl IntoIterator<Item = (S, Arc<dyn DataLoader<<<EC as EvaluatorComponentTypes>::Model as InferenceStep>::Input>>)>, ) -> EvaluationResult
Run the evaluation on multiple named datasets sequentially.
Prefer this over calling eval in a loop — the progress logger
receives the correct total_tests count and end_test is called between splits.
Auto Trait Implementations§
impl<EC> !RefUnwindSafe for Evaluator<EC>
impl<EC> !Unpin for Evaluator<EC>
impl<EC> !UnsafeUnpin for Evaluator<EC>
impl<EC> !UnwindSafe for Evaluator<EC>
impl<EC> Freeze for Evaluator<EC>where
<EC as EvaluatorComponentTypes>::Model: Freeze,
AsyncProcessorEvaluation<FullEventProcessorEvaluation<<<EC as EvaluatorComponentTypes>::Model as InferenceStep>::Output>>: Freeze,
impl<EC> Send for Evaluator<EC>where
<EC as EvaluatorComponentTypes>::Model: Send,
AsyncProcessorEvaluation<FullEventProcessorEvaluation<<<EC as EvaluatorComponentTypes>::Model as InferenceStep>::Output>>: Send,
impl<EC> Sync for Evaluator<EC>where
<EC as EvaluatorComponentTypes>::Model: Sync,
AsyncProcessorEvaluation<FullEventProcessorEvaluation<<<EC as EvaluatorComponentTypes>::Model as InferenceStep>::Output>>: Sync,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more