You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.Error(err, "Failed to schedule request", "evictionReason", evictionReason.String())
105
+
switch {
106
+
caseerrors.Is(err, scheduling.ErrEvicted):
107
+
// Handle eviction errors, including the eviction reason.
108
+
switchevictionReason {
109
+
casescheduling.ReasonTTLExpiry:
110
+
returnnil, errutil.Error{Code: errutil.InferencePoolResourceExhausted, Msg: fmt.Sprintf("request evicted due to TTL expiry: %v", err)}
111
+
casescheduling.ReasonExternalContextExpiry:
112
+
// TODO: determine if this is an appropriate code. For expiry due to
113
+
// gateway timeout, I think it makes sense. For manual cancellation, I
114
+
// am not certain.
115
+
returnnil, errutil.Error{Code: errutil.InferencePoolResourceExhausted, Msg: fmt.Sprintf("request evicted due to external context expiry: %v", err)}
116
+
casescheduling.ReasonPreempted:
117
+
returnnil, errutil.Error{Code: errutil.InferencePoolResourceExhausted, Msg: fmt.Sprintf("request evicted due to preemption: %v", err)}
118
+
casescheduling.ReasonCannotFindBackend:
119
+
returnnil, errutil.Error{Code: errutil.InferencePoolResourceExhausted, Msg: fmt.Sprintf("request evicted due to failure to find a suitable backend: %v", err)}
logger.Error(err, "Failed to schedule request", "evictionReason", evictionReason.String())
376
+
switch {
377
+
caseerrors.Is(err, scheduling.ErrEvicted):
378
+
// Handle eviction errors, including the eviction reason.
379
+
switchevictionReason {
380
+
casescheduling.ReasonTTLExpiry:
381
+
returnreqCtx, errutil.Error{Code: errutil.InferencePoolResourceExhausted, Msg: fmt.Sprintf("request evicted due to TTL expiry: %v", err)}
382
+
casescheduling.ReasonExternalContextExpiry:
383
+
// TODO: determine if this is an appropriate code. For expiry due to
384
+
// gateway timeout, I think it makes sense. For manual cancellation, I
385
+
// am not certain.
386
+
returnreqCtx, errutil.Error{Code: errutil.InferencePoolResourceExhausted, Msg: fmt.Sprintf("request evicted due to external context expiry: %v", err)}
387
+
casescheduling.ReasonPreempted:
388
+
returnreqCtx, errutil.Error{Code: errutil.InferencePoolResourceExhausted, Msg: fmt.Sprintf("request evicted due to preemption: %v", err)}
389
+
casescheduling.ReasonCannotFindBackend:
390
+
returnreqCtx, errutil.Error{Code: errutil.InferencePoolResourceExhausted, Msg: fmt.Sprintf("request evicted due to failure to find a suitable backend: %v", err)}
0 commit comments