#[non_exhaustive]pub enum MIError {
Model(Error),
Hook(String),
Intervention(String),
Config(String),
Tokenizer(String),
Io(Error),
Download(String),
Memory(String),
}Expand description
Errors that can occur during MI operations.
This enum is #[non_exhaustive]: new variants will be added in future
releases as new backends and capabilities are added.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Model(Error)
Model loading or forward pass error (wraps candle).
Hook(String)
Hook capture or lookup error.
Intervention(String)
Intervention validation or application error.
Config(String)
Model configuration parsing error.
Tokenizer(String)
Tokenizer error.
Io(Error)
I/O error.
Download(String)
Model download error.
Returned when downloading a model from the HuggingFace Hub fails.
Memory(String)
Memory measurement error.
Returned when a platform API for RAM or VRAM measurement fails.
Trait Implementations§
Source§impl Error for MIError
impl Error for MIError
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()
Source§impl From<AnamnesisError> for MIError
Available on crate feature sae only.Bridge anamnesis errors into MIError when the sae feature is enabled.
impl From<AnamnesisError> for MIError
sae only.Bridge anamnesis errors into MIError when the sae feature is enabled.
AnamnesisError is #[non_exhaustive], so the
catch-all arm ensures forward compatibility with future variants.
Source§fn from(e: AnamnesisError) -> Self
fn from(e: AnamnesisError) -> Self
Auto Trait Implementations§
impl Freeze for MIError
impl !RefUnwindSafe for MIError
impl Send for MIError
impl Sync for MIError
impl Unpin for MIError
impl UnsafeUnpin for MIError
impl !UnwindSafe for MIError
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§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.