Skip to main content

TorshDistributedError

Enum TorshDistributedError 

Source
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

Fields

§reason: String
§expected: String
§

CommunicationError

Fields

§operation: String
§cause: String
§

BackendError

Fields

§backend: String
§message: String
§

RankOutOfBounds

Fields

§rank: u32
§world_size: u32
§

FeatureNotAvailable

Fields

§feature: String
§required_features: String
§

ProcessGroupNotFound

Fields

§group_id: String
§available_groups: Vec<String>
§

TensorShapeMismatch

Fields

§expected: Vec<usize>
§actual: Vec<usize>
§

OperationTimeout

Fields

§operation: String
§timeout_secs: u64
§

ProcessFailure

Fields

§rank: u32
§operation: String
§cause: String
§

MemoryAllocationFailed

Fields

§requested_bytes: usize
§context: String
§

SerializationError(String)

§

IoError(String)

§

InternalError(String)

§

ConfigurationError

Fields

§message: String
§

CheckpointError

Fields

§operation: String
§cause: String

Implementations§

Source§

impl TorshDistributedError

Source

pub fn invalid_argument( arg: impl Into<String>, reason: impl Into<String>, expected: impl Into<String>, ) -> Self

Create an invalid argument error with context

Source

pub fn communication_error( operation: impl Into<String>, cause: impl Into<String>, ) -> Self

Create a communication error with operation context

Source

pub fn backend_error( backend: impl Into<String>, message: impl Into<String>, ) -> Self

Create a backend error with backend type

Source

pub fn feature_not_available( feature: impl Into<String>, required_features: impl Into<String>, ) -> Self

Create a feature not available error with required features

Source

pub fn process_group_not_found( group_id: impl Into<String>, available_groups: Vec<String>, ) -> Self

Create a process group not found error

Source

pub fn tensor_shape_mismatch(expected: Vec<usize>, actual: Vec<usize>) -> Self

Create a tensor shape mismatch error

Source

pub fn operation_timeout( operation: impl Into<String>, timeout_secs: u64, ) -> Self

Create an operation timeout error

Source

pub fn process_failure( rank: u32, operation: impl Into<String>, cause: impl Into<String>, ) -> Self

Create a process failure error

Source

pub fn memory_allocation_failed( requested_bytes: usize, context: impl Into<String>, ) -> Self

Create a memory allocation failure error

Source

pub fn serialization_error(message: impl Into<String>) -> Self

Create a serialization error

Source

pub fn io_error(message: impl Into<String>) -> Self

Create an I/O error

Source

pub fn internal_error(message: impl Into<String>) -> Self

Create an internal error

Source

pub fn configuration_error(message: impl Into<String>) -> Self

Create a configuration error

Source

pub fn checkpoint_error( operation: impl Into<String>, cause: impl Into<String>, ) -> Self

Create a checkpoint error

Source

pub fn not_implemented(feature: impl Into<String>) -> Self

Create a not implemented error

Source

pub fn is_retryable(&self) -> bool

Check if this error is retryable

Source

pub fn recovery_suggestions(&self) -> Vec<&'static str>

Get suggested recovery actions for this error

Trait Implementations§

Source§

impl Debug for TorshDistributedError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for TorshDistributedError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for TorshDistributedError

1.30.0 · Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<TorshDistributedError> for TorshError

Source§

fn from(err: TorshDistributedError) -> Self

Converts to this type from the input type.
Source§

impl From<TorshError> for TorshDistributedError

Source§

fn from(err: TorshError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more