pub enum LogitsError {
NullLogits,
TokenNotInitialized(i32),
TokenIndexExceedsContext {
token_index: u32,
context_size: u32,
},
VocabSizeOverflow(TryFromIntError),
TokenIndexOverflow(TryFromIntError),
}Expand description
When logits-related functions fail
Variants§
NullLogits
The logits data pointer is null.
TokenNotInitialized(i32)
The requested token index has not been initialized for logits.
TokenIndexExceedsContext
The token index exceeds the context size.
VocabSizeOverflow(TryFromIntError)
The vocabulary size does not fit into a usize.
TokenIndexOverflow(TryFromIntError)
The token index does not fit into a u32.
Trait Implementations§
Source§impl Debug for LogitsError
impl Debug for LogitsError
Source§impl Display for LogitsError
impl Display for LogitsError
Source§impl Error for LogitsError
impl Error for LogitsError
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 PartialEq for LogitsError
impl PartialEq for LogitsError
impl Eq for LogitsError
impl StructuralPartialEq for LogitsError
Auto Trait Implementations§
impl Freeze for LogitsError
impl RefUnwindSafe for LogitsError
impl Send for LogitsError
impl Sync for LogitsError
impl Unpin for LogitsError
impl UnsafeUnpin for LogitsError
impl UnwindSafe for LogitsError
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