#[non_exhaustive]pub enum EvalError {
DatasetEmpty,
InvalidFormat(String),
InferenceFailed(String),
IoError(String),
ParseError(String),
Numerical(String),
Io(Error),
MetricMismatch {
expected: &'static str,
got: String,
},
}Expand description
Errors that can occur during model evaluation.
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.
DatasetEmpty
The provided dataset contains no examples.
InvalidFormat(String)
Input data has an unexpected or malformed format.
InferenceFailed(String)
The model inference step failed.
IoError(String)
An I/O error with a human-readable message (legacy string form).
ParseError(String)
Parsing of a value (e.g. JSON field, integer) failed.
Numerical(String)
A numerical invariant was violated (NaN, divide-by-zero, overflow).
Io(Error)
An I/O error bubbled up from the standard library.
Preferred over EvalError::IoError for automatic ?-propagation
of std::io::Error values.
MetricMismatch
The caller supplied data with the wrong metric shape or type.
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
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()
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