#[non_exhaustive]pub enum WeightsError {
Safetensors(String),
Msgpack(String),
UnsupportedType(String, String),
Missing(String),
Mismatch {
name: String,
actual: String,
expected: String,
},
}Expand description
An error from loading weights.
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.
Safetensors(String)
The file is not valid safetensors.
Msgpack(String)
The file is not valid Flax MessagePack data.
UnsupportedType(String, String)
An element type that ruxla does not have.
Missing(String)
No weight has the name.
Mismatch
The weight has another type or shape than expected.
Trait Implementations§
Source§impl Debug for WeightsError
impl Debug for WeightsError
Source§impl Display for WeightsError
impl Display for WeightsError
Source§impl Error for WeightsError
impl Error for WeightsError
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<WeightsError> for ModelError
impl From<WeightsError> for ModelError
Source§fn from(source: WeightsError) -> Self
fn from(source: WeightsError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for WeightsError
impl RefUnwindSafe for WeightsError
impl Send for WeightsError
impl Sync for WeightsError
impl Unpin for WeightsError
impl UnsafeUnpin for WeightsError
impl UnwindSafe for WeightsError
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