pub trait FeedbackEvaluator {
// Required method
async fn feedback_metric(
&self,
example: &Example,
prediction: &Prediction,
) -> FeedbackMetric;
// Provided method
async fn multi_objective_metric(
&self,
example: &Example,
prediction: &Prediction,
) -> Vec<FeedbackMetric> { ... }
}Expand description
Trait for evaluators that provide rich feedback
This extends the basic Evaluator trait to return feedback alongside scores.
Required Methods§
Sourceasync fn feedback_metric(
&self,
example: &Example,
prediction: &Prediction,
) -> FeedbackMetric
async fn feedback_metric( &self, example: &Example, prediction: &Prediction, ) -> FeedbackMetric
Evaluate an example and return both score and feedback
Provided Methods§
Sourceasync fn multi_objective_metric(
&self,
example: &Example,
prediction: &Prediction,
) -> Vec<FeedbackMetric>
async fn multi_objective_metric( &self, example: &Example, prediction: &Prediction, ) -> Vec<FeedbackMetric>
Evaluate with multiple objectives (for multi-objective optimization)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.