pub(super) enum InferenceOutcome {
Ok,
Failure,
TrtFatal,
CircuitBreak,
Rejected,
}Expand description
Outcome of a single inference call in the worker request loop.
Used to communicate circuit-breaker and fatal-exit decisions out of the
nested borrow scope (where session/tokenizer live) into the outer
scope where models can be safely mutated.
Variants§
Ok
Inference succeeded; reset the consecutive-failure counter.
Failure
Inference failed; increment the consecutive-failure counter.
TrtFatal
Fatal TRT engine build error; worker should exit immediately.
CircuitBreak
Consecutive-failure threshold reached; unload models and reset counter.
Rejected
The in-band TRT JIT guard refused the request (dangerous, uncovered shape). The worker is healthy and deliberately protected itself, so the consecutive-failure counter is left unchanged — a refusal is neither a success nor a GPU failure and must not contribute to tripping the circuit breaker.
Trait Implementations§
Source§impl Clone for InferenceOutcome
impl Clone for InferenceOutcome
Source§fn clone(&self) -> InferenceOutcome
fn clone(&self) -> InferenceOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InferenceOutcome
impl Debug for InferenceOutcome
Source§impl Default for InferenceOutcome
impl Default for InferenceOutcome
Source§fn default() -> InferenceOutcome
fn default() -> InferenceOutcome
Source§impl PartialEq for InferenceOutcome
impl PartialEq for InferenceOutcome
impl Copy for InferenceOutcome
impl Eq for InferenceOutcome
impl StructuralPartialEq for InferenceOutcome
Auto Trait Implementations§
impl Freeze for InferenceOutcome
impl RefUnwindSafe for InferenceOutcome
impl Send for InferenceOutcome
impl Sync for InferenceOutcome
impl Unpin for InferenceOutcome
impl UnsafeUnpin for InferenceOutcome
impl UnwindSafe for InferenceOutcome
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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 more