pub enum EvalError {
Show 13 variants
BenchmarkLoad(String, Error),
BenchmarkParse(String, String),
EmptyBenchmarkSet,
BudgetExceeded {
used: u64,
budget: u64,
},
Llm(LlmError),
JudgeParse {
case_index: usize,
detail: String,
},
Semaphore(String),
BenchmarkTooLarge {
path: String,
size: u64,
limit: u64,
},
PathTraversal(String),
OutOfRange {
kind: String,
value: f64,
min: f64,
max: f64,
},
SearchSpaceExhausted {
strategy: &'static str,
},
InvalidRadius {
radius: f64,
},
Storage(String),
}Expand description
Errors that can occur during experiment evaluation, benchmark loading, or persistence.
Most variants carry structured context (file paths, token counts, parameter names) so that callers can surface actionable diagnostics to the user.
§Examples
use zeph_experiments::EvalError;
let err = EvalError::BudgetExceeded { used: 1_500, budget: 1_000 };
assert!(err.to_string().contains("1500"));
let err = EvalError::InvalidRadius { radius: -1.0 };
assert!(err.to_string().contains("finite and positive"));Variants§
BenchmarkLoad(String, Error)
The benchmark TOML file could not be opened or read.
BenchmarkParse(String, String)
The benchmark TOML file could not be parsed.
EmptyBenchmarkSet
BenchmarkSet::validate was called on an empty cases vec.
BudgetExceeded
The cumulative token budget for judge calls was exhausted.
When this error is returned from Evaluator::evaluate, the report will
have is_partial = true and only include cases scored before the budget was hit.
Llm(LlmError)
An LLM call failed (network, auth, timeout, or API error).
JudgeParse
The judge model returned a non-finite or structurally invalid score.
Fields
Semaphore(String)
The internal tokio semaphore used for concurrency control was closed.
This is an internal invariant violation and should never occur in normal usage.
BenchmarkTooLarge
The benchmark file exceeds the 10 MiB size limit.
Fields
PathTraversal(String)
The benchmark file’s canonical path escaped the expected parent directory.
This indicates a symlink traversal attack and is rejected before any file I/O.
OutOfRange
A parameter value was outside its declared [min, max] range.
Fields
SearchSpaceExhausted
All variations in the generator’s search space have been visited.
InvalidRadius
The Neighborhood radius was not finite and positive.
Storage(String)
An experiment result could not be persisted to SQLite.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.