pub enum TorshDistributedError {
Show 16 variants
BackendNotInitialized,
InvalidArgument {
arg: String,
reason: String,
expected: String,
},
CommunicationError {
operation: String,
cause: String,
},
BackendError {
backend: String,
message: String,
},
RankOutOfBounds {
rank: u32,
world_size: u32,
},
FeatureNotAvailable {
feature: String,
required_features: String,
},
ProcessGroupNotFound {
group_id: String,
available_groups: Vec<String>,
},
TensorShapeMismatch {
expected: Vec<usize>,
actual: Vec<usize>,
},
OperationTimeout {
operation: String,
timeout_secs: u64,
},
ProcessFailure {
rank: u32,
operation: String,
cause: String,
},
MemoryAllocationFailed {
requested_bytes: usize,
context: String,
},
SerializationError(String),
IoError(String),
InternalError(String),
ConfigurationError {
message: String,
},
CheckpointError {
operation: String,
cause: String,
},
}Expand description
Distributed training specific errors with detailed context
Variants§
BackendNotInitialized
InvalidArgument
CommunicationError
BackendError
RankOutOfBounds
FeatureNotAvailable
ProcessGroupNotFound
TensorShapeMismatch
OperationTimeout
ProcessFailure
MemoryAllocationFailed
SerializationError(String)
IoError(String)
InternalError(String)
ConfigurationError
CheckpointError
Implementations§
Source§impl TorshDistributedError
impl TorshDistributedError
Sourcepub fn invalid_argument(
arg: impl Into<String>,
reason: impl Into<String>,
expected: impl Into<String>,
) -> Self
pub fn invalid_argument( arg: impl Into<String>, reason: impl Into<String>, expected: impl Into<String>, ) -> Self
Create an invalid argument error with context
Sourcepub fn communication_error(
operation: impl Into<String>,
cause: impl Into<String>,
) -> Self
pub fn communication_error( operation: impl Into<String>, cause: impl Into<String>, ) -> Self
Create a communication error with operation context
Sourcepub fn backend_error(
backend: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn backend_error( backend: impl Into<String>, message: impl Into<String>, ) -> Self
Create a backend error with backend type
Sourcepub fn feature_not_available(
feature: impl Into<String>,
required_features: impl Into<String>,
) -> Self
pub fn feature_not_available( feature: impl Into<String>, required_features: impl Into<String>, ) -> Self
Create a feature not available error with required features
Sourcepub fn process_group_not_found(
group_id: impl Into<String>,
available_groups: Vec<String>,
) -> Self
pub fn process_group_not_found( group_id: impl Into<String>, available_groups: Vec<String>, ) -> Self
Create a process group not found error
Sourcepub fn tensor_shape_mismatch(expected: Vec<usize>, actual: Vec<usize>) -> Self
pub fn tensor_shape_mismatch(expected: Vec<usize>, actual: Vec<usize>) -> Self
Create a tensor shape mismatch error
Sourcepub fn operation_timeout(
operation: impl Into<String>,
timeout_secs: u64,
) -> Self
pub fn operation_timeout( operation: impl Into<String>, timeout_secs: u64, ) -> Self
Create an operation timeout error
Sourcepub fn process_failure(
rank: u32,
operation: impl Into<String>,
cause: impl Into<String>,
) -> Self
pub fn process_failure( rank: u32, operation: impl Into<String>, cause: impl Into<String>, ) -> Self
Create a process failure error
Sourcepub fn memory_allocation_failed(
requested_bytes: usize,
context: impl Into<String>,
) -> Self
pub fn memory_allocation_failed( requested_bytes: usize, context: impl Into<String>, ) -> Self
Create a memory allocation failure error
Sourcepub fn serialization_error(message: impl Into<String>) -> Self
pub fn serialization_error(message: impl Into<String>) -> Self
Create a serialization error
Sourcepub fn internal_error(message: impl Into<String>) -> Self
pub fn internal_error(message: impl Into<String>) -> Self
Create an internal error
Sourcepub fn configuration_error(message: impl Into<String>) -> Self
pub fn configuration_error(message: impl Into<String>) -> Self
Create a configuration error
Sourcepub fn checkpoint_error(
operation: impl Into<String>,
cause: impl Into<String>,
) -> Self
pub fn checkpoint_error( operation: impl Into<String>, cause: impl Into<String>, ) -> Self
Create a checkpoint error
Sourcepub fn not_implemented(feature: impl Into<String>) -> Self
pub fn not_implemented(feature: impl Into<String>) -> Self
Create a not implemented error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable
Sourcepub fn recovery_suggestions(&self) -> Vec<&'static str>
pub fn recovery_suggestions(&self) -> Vec<&'static str>
Get suggested recovery actions for this error
Trait Implementations§
Source§impl Debug for TorshDistributedError
impl Debug for TorshDistributedError
Source§impl Display for TorshDistributedError
impl Display for TorshDistributedError
Source§impl Error for TorshDistributedError
impl Error for TorshDistributedError
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<TorshDistributedError> for TorshError
impl From<TorshDistributedError> for TorshError
Source§fn from(err: TorshDistributedError) -> Self
fn from(err: TorshDistributedError) -> Self
Converts to this type from the input type.
Source§impl From<TorshError> for TorshDistributedError
impl From<TorshError> for TorshDistributedError
Source§fn from(err: TorshError) -> Self
fn from(err: TorshError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TorshDistributedError
impl RefUnwindSafe for TorshDistributedError
impl Send for TorshDistributedError
impl Sync for TorshDistributedError
impl Unpin for TorshDistributedError
impl UnsafeUnpin for TorshDistributedError
impl UnwindSafe for TorshDistributedError
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