pub enum DataError {
Dataset {
kind: DatasetErrorKind,
context: String,
suggestion: Option<String>,
},
DataLoader {
kind: DataLoaderErrorKind,
context: String,
suggestion: Option<String>,
},
Transform {
kind: TransformErrorKind,
transform_name: String,
context: String,
suggestion: Option<String>,
},
Sampler {
kind: SamplerErrorKind,
sampler_type: String,
context: String,
suggestion: Option<String>,
},
Collation {
kind: CollationErrorKind,
batch_info: BatchInfo,
context: String,
suggestion: Option<String>,
},
Io {
kind: IoErrorKind,
path: Option<String>,
operation: String,
context: String,
suggestion: Option<String>,
},
Configuration {
kind: ConfigErrorKind,
parameter: String,
value: String,
context: String,
suggestion: Option<String>,
},
Resource {
kind: ResourceErrorKind,
resource_type: String,
requested: Option<usize>,
available: Option<usize>,
context: String,
suggestion: Option<String>,
},
Privacy {
kind: PrivacyErrorKind,
privacy_parameter: String,
context: String,
suggestion: Option<String>,
},
GpuError(String),
Other(String),
}Expand description
Enhanced error types specific to data loading operations
Variants§
Dataset
Dataset-related errors
DataLoader
Data loader errors
Transform
Transform operation errors
Sampler
Sampler-related errors
Collation
Collation errors
Io
I/O and file system errors
Fields
kind: IoErrorKindConfiguration
Configuration and validation errors
Fields
kind: ConfigErrorKindResource
Memory and resource errors
Fields
kind: ResourceErrorKindPrivacy
Privacy and differential privacy errors
GpuError(String)
GPU acceleration and compute errors
Other(String)
Other errors
Implementations§
Source§impl DataError
impl DataError
Sourcepub fn dataset(kind: DatasetErrorKind, context: impl Into<String>) -> Self
pub fn dataset(kind: DatasetErrorKind, context: impl Into<String>) -> Self
Create a dataset error with context
Sourcepub fn dataloader(kind: DataLoaderErrorKind, context: impl Into<String>) -> Self
pub fn dataloader(kind: DataLoaderErrorKind, context: impl Into<String>) -> Self
Create a data loader error with context
Sourcepub fn transform(
kind: TransformErrorKind,
transform_name: impl Into<String>,
context: impl Into<String>,
) -> Self
pub fn transform( kind: TransformErrorKind, transform_name: impl Into<String>, context: impl Into<String>, ) -> Self
Create a transform error with context
Sourcepub fn sampler(
kind: SamplerErrorKind,
sampler_type: impl Into<String>,
context: impl Into<String>,
) -> Self
pub fn sampler( kind: SamplerErrorKind, sampler_type: impl Into<String>, context: impl Into<String>, ) -> Self
Create a sampler error with context
Sourcepub fn collation(
kind: CollationErrorKind,
batch_info: BatchInfo,
context: impl Into<String>,
) -> Self
pub fn collation( kind: CollationErrorKind, batch_info: BatchInfo, context: impl Into<String>, ) -> Self
Create a collation error with context
Sourcepub fn io(
kind: IoErrorKind,
operation: impl Into<String>,
context: impl Into<String>,
) -> Self
pub fn io( kind: IoErrorKind, operation: impl Into<String>, context: impl Into<String>, ) -> Self
Create an I/O error with context
Sourcepub fn config(
kind: ConfigErrorKind,
parameter: impl Into<String>,
value: impl Into<String>,
context: impl Into<String>,
) -> Self
pub fn config( kind: ConfigErrorKind, parameter: impl Into<String>, value: impl Into<String>, context: impl Into<String>, ) -> Self
Create a configuration error with context
Sourcepub fn resource(
kind: ResourceErrorKind,
resource_type: impl Into<String>,
context: impl Into<String>,
) -> Self
pub fn resource( kind: ResourceErrorKind, resource_type: impl Into<String>, context: impl Into<String>, ) -> Self
Create a resource error with context
Sourcepub fn privacy(
kind: PrivacyErrorKind,
privacy_parameter: impl Into<String>,
context: impl Into<String>,
) -> Self
pub fn privacy( kind: PrivacyErrorKind, privacy_parameter: impl Into<String>, context: impl Into<String>, ) -> Self
Create a privacy error with context
Sourcepub fn privacy_budget_exceeded(context: impl Into<String>) -> Self
pub fn privacy_budget_exceeded(context: impl Into<String>) -> Self
Create a privacy budget exceeded error
Sourcepub fn invalid_privacy_parameter(context: impl Into<String>) -> Self
pub fn invalid_privacy_parameter(context: impl Into<String>) -> Self
Create an invalid privacy parameter error
Sourcepub fn privacy_access_limit_exceeded(context: impl Into<String>) -> Self
pub fn privacy_access_limit_exceeded(context: impl Into<String>) -> Self
Create an access limit exceeded error
Sourcepub fn privacy_access_denied(context: impl Into<String>) -> Self
pub fn privacy_access_denied(context: impl Into<String>) -> Self
Create an access denied error
Sourcepub fn tensor_creation_failed(context: impl Into<String>) -> Self
pub fn tensor_creation_failed(context: impl Into<String>) -> Self
Create a tensor creation failed error
Sourcepub fn noise_generation_failed(context: impl Into<String>) -> Self
pub fn noise_generation_failed(context: impl Into<String>) -> Self
Create a noise generation failed error
Sourcepub fn privacy_composition_error(context: impl Into<String>) -> Self
pub fn privacy_composition_error(context: impl Into<String>) -> Self
Create a composition error
Sourcepub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
Add a suggestion for error recovery
Sourcepub fn with_resource_info(
self,
requested: usize,
available: Option<usize>,
) -> Self
pub fn with_resource_info( self, requested: usize, available: Option<usize>, ) -> Self
Add resource information for resource errors
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if the error is recoverable
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Get error severity level
Trait Implementations§
Source§impl Error for DataError
impl Error for DataError
1.30.0 · 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<DataError> for TorshError
impl From<DataError> for TorshError
Source§impl From<DatabaseError> for DataError
impl From<DatabaseError> for DataError
Source§fn from(err: DatabaseError) -> Self
fn from(err: DatabaseError) -> Self
Source§impl From<TFRecordError> for DataError
impl From<TFRecordError> for DataError
Source§fn from(err: TFRecordError) -> Self
fn from(err: TFRecordError) -> Self
Source§impl From<TorshError> for DataError
impl From<TorshError> for DataError
Source§fn from(err: TorshError) -> Self
fn from(err: TorshError) -> Self
Auto Trait Implementations§
impl Freeze for DataError
impl RefUnwindSafe for DataError
impl Send for DataError
impl Sync for DataError
impl Unpin for DataError
impl UnsafeUnpin for DataError
impl UnwindSafe for DataError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.