#[non_exhaustive]pub enum Error {
Show 20 variants
InvalidDimensions {
expected: String,
actual: String,
},
InvalidParameter {
name: String,
value: String,
reason: String,
},
ModelArchitecture(String),
Training(String),
Optimizer(String),
LossFunction(String),
Augmentation(String),
Checkpoint(String),
TransferLearning(String),
Metric(String),
FeatureNotAvailable {
feature: String,
cargo_feature: String,
},
Core(OxiGdalError),
Image(String),
Serialization(String),
Io(Error),
Numerical(String),
EarlyStopping {
reason: String,
},
InvalidState(String),
Backend(String),
NotImplemented(String),
}Expand description
Error types for ML foundation operations.
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.
InvalidDimensions
Invalid input dimensions
InvalidParameter
Invalid parameter value
Fields
ModelArchitecture(String)
Model architecture error
Training(String)
Training error
Optimizer(String)
Optimizer error
LossFunction(String)
Loss function error
Augmentation(String)
Data augmentation error
Checkpoint(String)
Checkpoint I/O error
TransferLearning(String)
Transfer learning error
Metric(String)
Metric computation error
FeatureNotAvailable
Feature not available
Fields
Core(OxiGdalError)
OxiGDAL core error
Image(String)
Image processing error
Serialization(String)
Serialization/deserialization error
Io(Error)
I/O error
Numerical(String)
Numerical error (overflow, underflow, NaN, etc.)
EarlyStopping
Early stopping triggered
InvalidState(String)
Invalid model state
Backend(String)
Backend error
NotImplemented(String)
Not implemented
Implementations§
Source§impl Error
impl Error
Sourcepub fn invalid_dimensions(
expected: impl Into<String>,
actual: impl Into<String>,
) -> Self
pub fn invalid_dimensions( expected: impl Into<String>, actual: impl Into<String>, ) -> Self
Creates an invalid dimensions error.
Sourcepub fn invalid_parameter(
name: impl Into<String>,
value: impl Display,
reason: impl Into<String>,
) -> Self
pub fn invalid_parameter( name: impl Into<String>, value: impl Display, reason: impl Into<String>, ) -> Self
Creates an invalid parameter error.
Sourcepub fn feature_not_available(
feature: impl Into<String>,
cargo_feature: impl Into<String>,
) -> Self
pub fn feature_not_available( feature: impl Into<String>, cargo_feature: impl Into<String>, ) -> Self
Creates a feature not available error.
Sourcepub fn early_stopping(reason: impl Into<String>) -> Self
pub fn early_stopping(reason: impl Into<String>) -> Self
Creates an early stopping error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<OxiGdalError> for Error
impl From<OxiGdalError> for Error
Source§fn from(source: OxiGdalError) -> Self
fn from(source: OxiGdalError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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
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>
Converts
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>
Converts
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 more