mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-05 00:42:07 +00:00
Tiny fix.
This commit is contained in:
parent
3aa8564652
commit
338cdc2eb8
@ -9,16 +9,13 @@ async fn main() {
|
|||||||
// List of backend servers
|
// List of backend servers
|
||||||
let backends = vec![
|
let backends = vec![
|
||||||
"http://localhost:8000".to_string(),
|
"http://localhost:8000".to_string(),
|
||||||
// "http://localhost:8001".to_string(),
|
"http://localhost:8001".to_string(),
|
||||||
// "http://localhost:8002".to_string(),
|
// "http://localhost:8002".to_string(),
|
||||||
// "http://localhost:8003".to_string(),
|
// "http://localhost:8003".to_string(),
|
||||||
];
|
];
|
||||||
|
|
||||||
// Create a new instance of the RoundRobinRouter
|
// Create a new instance of the RoundRobinRouter
|
||||||
|
|
||||||
println!("Using Content aware");
|
|
||||||
// Create the Axum router
|
|
||||||
|
|
||||||
let (sx, rx) = tokio::sync::mpsc::channel(100);
|
let (sx, rx) = tokio::sync::mpsc::channel(100);
|
||||||
let communicator = Communicator::new(sx);
|
let communicator = Communicator::new(sx);
|
||||||
tokio::task::spawn(async move {
|
tokio::task::spawn(async move {
|
||||||
@ -28,6 +25,9 @@ async fn main() {
|
|||||||
let mut router = OverloadHandler::new(lb, backends, rx);
|
let mut router = OverloadHandler::new(lb, backends, rx);
|
||||||
router.run().await;
|
router.run().await;
|
||||||
} else {
|
} else {
|
||||||
|
println!("Using Content aware");
|
||||||
|
// Create the Axum router
|
||||||
|
|
||||||
let lb = ContentAware::new();
|
let lb = ContentAware::new();
|
||||||
let mut router = OverloadHandler::new(lb, backends, rx);
|
let mut router = OverloadHandler::new(lb, backends, rx);
|
||||||
router.run().await;
|
router.run().await;
|
||||||
|
@ -124,6 +124,7 @@ impl Node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
|
#[allow(dead_code)]
|
||||||
fn remove(&mut self, data: &[u8]) -> Result<(), Error> {
|
fn remove(&mut self, data: &[u8]) -> Result<(), Error> {
|
||||||
// TODO reclaim the nodes too.
|
// TODO reclaim the nodes too.
|
||||||
let mismatch = mismatch(data, &self.content);
|
let mismatch = mismatch(data, &self.content);
|
||||||
@ -155,7 +156,7 @@ impl Trie {
|
|||||||
self.root.insert(data)
|
self.root.insert(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
#[cfg(debug_assertions)]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn remove(&mut self, data: &[u8]) -> Result<(), Error> {
|
pub fn remove(&mut self, data: &[u8]) -> Result<(), Error> {
|
||||||
self.root.remove(data)
|
self.root.remove(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user