#[non_exhaustive]pub enum EvalError {
IoError(String),
ParseError(String),
EmbeddingError(String),
PredictorError(String),
LengthMismatch {
predictions: usize,
references: usize,
},
}Expand description
Evaluation error
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IoError(String)
Underlying IO error (e.g. file read failure).
ParseError(String)
Data parse error (e.g. JSON/JSONL parse failure).
EmbeddingError(String)
Embedding computation error.
PredictorError(String)
Predictor execution error.
LengthMismatch
Prediction/reference sample counts differ in corpus-level evaluation (one-to-one).
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<StructuredJudgeError> for EvalError
P2-6: errors from the shared judge core (lc-core::judge) map into the evaluation error domain,
so structured_call(...).await? works directly in a Result<_, EvalError> context.
impl From<StructuredJudgeError> for EvalError
P2-6: errors from the shared judge core (lc-core::judge) map into the evaluation error domain,
so structured_call(...).await? works directly in a Result<_, EvalError> context.
Source§fn from(e: StructuredJudgeError) -> Self
fn from(e: StructuredJudgeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EvalError
impl RefUnwindSafe for EvalError
impl Send for EvalError
impl Sync for EvalError
impl Unpin for EvalError
impl UnsafeUnpin for EvalError
impl UnwindSafe for EvalError
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