Commit 08fcd7e9 authored by Neelay Shah's avatar Neelay Shah Committed by GitHub
Browse files

refactor: move libs to lib dir


Signed-off-by: default avatarNeelay Shah <neelays@nvidia.com>
Co-authored-by: default avatarRyan McCormick <rmccormick@nvidia.com>
parent 0bfd9a76
...@@ -27,10 +27,10 @@ use mistralrs::{ ...@@ -27,10 +27,10 @@ use mistralrs::{
}; };
use tokio::sync::mpsc::channel; use tokio::sync::mpsc::channel;
use triton_distributed::engine::{AsyncEngine, AsyncEngineContextProvider, ResponseStream}; use triton_distributed_runtime::engine::{AsyncEngine, AsyncEngineContextProvider, ResponseStream};
use triton_distributed::pipeline::error as pipeline_error; use triton_distributed_runtime::pipeline::error as pipeline_error;
use triton_distributed::pipeline::{Error, ManyOut, SingleIn}; use triton_distributed_runtime::pipeline::{Error, ManyOut, SingleIn};
use triton_distributed::protocols::annotated::Annotated; use triton_distributed_runtime::protocols::annotated::Annotated;
use crate::protocols::openai::chat_completions::{ use crate::protocols::openai::chat_completions::{
ChatCompletionChoiceDelta, ChatCompletionContent, ChatCompletionRequest, ChatCompletionChoiceDelta, ChatCompletionContent, ChatCompletionRequest,
......
...@@ -18,7 +18,7 @@ use std::sync::Arc; ...@@ -18,7 +18,7 @@ use std::sync::Arc;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use tokio::sync::mpsc::Receiver; use tokio::sync::mpsc::Receiver;
use triton_distributed::{ use triton_distributed_runtime::{
protocols::{self, annotated::Annotated}, protocols::{self, annotated::Annotated},
transports::etcd::{KeyValue, WatchEvent}, transports::etcd::{KeyValue, WatchEvent},
DistributedRuntime, Result, DistributedRuntime, Result,
......
...@@ -48,7 +48,7 @@ use crate::types::{ ...@@ -48,7 +48,7 @@ use crate::types::{
Annotated, Annotated,
}; };
use triton_distributed::pipeline::{AsyncEngineContext, Context}; use triton_distributed_runtime::pipeline::{AsyncEngineContext, Context};
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub(crate) struct ErrorResponse { pub(crate) struct ErrorResponse {
...@@ -91,7 +91,7 @@ impl ErrorResponse { ...@@ -91,7 +91,7 @@ impl ErrorResponse {
) )
} }
/// The OAI endpoints call an [`triton_distributed::engine::AsyncEngine`] which are specialized to return /// The OAI endpoints call an [`triton_distributed_runtime::engine::AsyncEngine`] which are specialized to return
/// an [`anyhow::Error`]. This method will convert the [`anyhow::Error`] into an [`HttpError`]. /// an [`anyhow::Error`]. This method will convert the [`anyhow::Error`] into an [`HttpError`].
/// If successful, it will return the [`HttpError`] as an [`ErrorResponse::internal_server_error`] /// If successful, it will return the [`HttpError`] as an [`ErrorResponse::internal_server_error`]
/// with the details of the error. /// with the details of the error.
......
...@@ -18,7 +18,7 @@ use futures::stream::StreamExt; ...@@ -18,7 +18,7 @@ use futures::stream::StreamExt;
use std::{sync::Arc, time::Duration}; use std::{sync::Arc, time::Duration};
use tokio_util::sync::CancellationToken; use tokio_util::sync::CancellationToken;
use tracing as log; use tracing as log;
use triton_distributed::{component::Component, DistributedRuntime}; use triton_distributed_runtime::{component::Component, DistributedRuntime};
pub mod indexer; pub mod indexer;
pub mod protocols; pub mod protocols;
...@@ -65,7 +65,7 @@ impl KvRouter { ...@@ -65,7 +65,7 @@ impl KvRouter {
} }
pub async fn new( pub async fn new(
nats_client: triton_distributed::transports::nats::Client, nats_client: triton_distributed_runtime::transports::nats::Client,
service_name: String, service_name: String,
kv_subject: String, kv_subject: String,
) -> Result<Arc<Self>> { ) -> Result<Arc<Self>> {
...@@ -145,7 +145,7 @@ impl KvRouter { ...@@ -145,7 +145,7 @@ impl KvRouter {
} }
async fn collect_endpoints( async fn collect_endpoints(
nats_client: triton_distributed::transports::nats::Client, nats_client: triton_distributed_runtime::transports::nats::Client,
service_name: String, service_name: String,
ep_tx: tokio::sync::mpsc::Sender<ProcessedEndpoints>, ep_tx: tokio::sync::mpsc::Sender<ProcessedEndpoints>,
cancel: CancellationToken, cancel: CancellationToken,
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
use crate::kv_router::{indexer::RouterEvent, protocols::KvCacheEvent, KV_EVENT_SUBJECT}; use crate::kv_router::{indexer::RouterEvent, protocols::KvCacheEvent, KV_EVENT_SUBJECT};
use tokio::sync::mpsc; use tokio::sync::mpsc;
use tracing as log; use tracing as log;
use triton_distributed::{component::Component, DistributedRuntime, Result}; use triton_distributed_runtime::{component::Component, DistributedRuntime, Result};
use uuid::Uuid; use uuid::Uuid;
pub struct KvPublisher { pub struct KvPublisher {
......
...@@ -19,12 +19,12 @@ pub use crate::kv_router::protocols::ForwardPassMetrics; ...@@ -19,12 +19,12 @@ pub use crate::kv_router::protocols::ForwardPassMetrics;
use anyhow::Result; use anyhow::Result;
use derive_builder::Builder; use derive_builder::Builder;
use triton_distributed::pipeline::network::{ use triton_distributed_runtime::pipeline::network::{
ingress::push_endpoint::PushEndpoint, ingress::push_endpoint::PushEndpoint,
PushWorkHandler, PushWorkHandler,
}; };
use triton_distributed::transports::nats::{self, ServiceExt}; use triton_distributed_runtime::transports::nats::{self, ServiceExt};
use tokio::sync::watch; use tokio::sync::watch;
use tokio_util::sync::CancellationToken; use tokio_util::sync::CancellationToken;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment