mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-21 23:12:07 +00:00
misc(router): remove SchedulingError
This commit is contained in:
parent
e6da212431
commit
1a3da05f34
@ -8,6 +8,7 @@ use hashbrown::HashMap;
|
|||||||
use log::warn;
|
use log::warn;
|
||||||
use tokenizers::{Encoding, Tokenizer};
|
use tokenizers::{Encoding, Tokenizer};
|
||||||
use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender};
|
use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender};
|
||||||
|
use tokio::sync::TryAcquireError;
|
||||||
use tokio::task::{spawn_blocking, JoinHandle};
|
use tokio::task::{spawn_blocking, JoinHandle};
|
||||||
use tokio::time::Instant;
|
use tokio::time::Instant;
|
||||||
use tokio_stream::wrappers::UnboundedReceiverStream;
|
use tokio_stream::wrappers::UnboundedReceiverStream;
|
||||||
@ -121,7 +122,7 @@ fn executor_status_looper(
|
|||||||
let what = e.to_string();
|
let what = e.to_string();
|
||||||
error!(error = what.as_str(), "Failed to schedule request");
|
error!(error = what.as_str(), "Failed to schedule request");
|
||||||
|
|
||||||
let err = Err(InferError::SchedulingError(what));
|
let err = Err(InferError::Overloaded(TryAcquireError::NoPermits));
|
||||||
if let Err(_) = ctx.streamer.send(err) {
|
if let Err(_) = ctx.streamer.send(err) {
|
||||||
error!("Failed to send back error to the client");
|
error!("Failed to send back error to the client");
|
||||||
}
|
}
|
||||||
|
@ -357,8 +357,6 @@ pub enum InferError {
|
|||||||
ToolError(String),
|
ToolError(String),
|
||||||
#[error("Stream event serialization error")]
|
#[error("Stream event serialization error")]
|
||||||
StreamSerializationError(String),
|
StreamSerializationError(String),
|
||||||
#[error("Scheduling error: {0}")]
|
|
||||||
SchedulingError(String),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl InferError {
|
impl InferError {
|
||||||
@ -373,7 +371,6 @@ impl InferError {
|
|||||||
InferError::MissingTemplateVariable(_) => "missing_template_variable",
|
InferError::MissingTemplateVariable(_) => "missing_template_variable",
|
||||||
InferError::ToolError(_) => "tool_error",
|
InferError::ToolError(_) => "tool_error",
|
||||||
InferError::StreamSerializationError(_) => "stream_serialization_error",
|
InferError::StreamSerializationError(_) => "stream_serialization_error",
|
||||||
InferError::SchedulingError(_) => "schedling"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user