pub struct EvaluationResult {
pub eval_id: String,
pub passed: bool,
pub scores: HashMap<String, f64>,
pub failures: Vec<Failure>,
pub duration: Duration,
pub turn_results: Vec<TurnResult>,
}Expand description
Result for a single test case
Fields§
§eval_id: StringTest case identifier
passed: boolWhether the test passed all criteria
scores: HashMap<String, f64>Scores for each criterion
failures: Vec<Failure>Failures (criteria that didn’t meet threshold)
duration: DurationExecution duration
turn_results: Vec<TurnResult>Detailed turn results
Implementations§
Source§impl EvaluationResult
impl EvaluationResult
Sourcepub fn passed(
eval_id: &str,
scores: HashMap<String, f64>,
duration: Duration,
) -> Self
pub fn passed( eval_id: &str, scores: HashMap<String, f64>, duration: Duration, ) -> Self
Create a passed result
Sourcepub fn failed(
eval_id: &str,
scores: HashMap<String, f64>,
failures: Vec<Failure>,
duration: Duration,
) -> Self
pub fn failed( eval_id: &str, scores: HashMap<String, f64>, failures: Vec<Failure>, duration: Duration, ) -> Self
Create a failed result
Sourcepub fn with_turn_results(self, turn_results: Vec<TurnResult>) -> Self
pub fn with_turn_results(self, turn_results: Vec<TurnResult>) -> Self
Add turn results
Trait Implementations§
Source§impl Clone for EvaluationResult
impl Clone for EvaluationResult
Source§fn clone(&self) -> EvaluationResult
fn clone(&self) -> EvaluationResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvaluationResult
impl Debug for EvaluationResult
Source§impl<'de> Deserialize<'de> for EvaluationResult
impl<'de> Deserialize<'de> for EvaluationResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EvaluationResult
impl RefUnwindSafe for EvaluationResult
impl Send for EvaluationResult
impl Sync for EvaluationResult
impl Unpin for EvaluationResult
impl UnsafeUnpin for EvaluationResult
impl UnwindSafe for EvaluationResult
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