Commit 602352ce authored by Neelay Shah's avatar Neelay Shah Committed by GitHub
Browse files

chore: rename dynamo (#44)


Co-authored-by: default avatarBiswa Panda <biswa.panda@gmail.com>
parent ecf53ce2
...@@ -48,7 +48,7 @@ use crate::types::{ ...@@ -48,7 +48,7 @@ use crate::types::{
Annotated, Annotated,
}; };
use dynemo_runtime::pipeline::{AsyncEngineContext, Context}; use dynamo_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 [`dynemo_runtime::engine::AsyncEngine`] which are specialized to return /// The OAI endpoints call an [`dynamo.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.
...@@ -516,7 +516,7 @@ pub fn list_models_router( ...@@ -516,7 +516,7 @@ pub fn list_models_router(
path: Option<String>, path: Option<String>,
) -> (Vec<RouteDoc>, Router) { ) -> (Vec<RouteDoc>, Router) {
// TODO: Why do we have this endpoint? // TODO: Why do we have this endpoint?
let custom_path = path.unwrap_or("/dynemo/alpha/list-models".to_string()); let custom_path = path.unwrap_or("/dynamo/alpha/list-models".to_string());
let doc_for_custom = RouteDoc::new(axum::http::Method::GET, &custom_path); let doc_for_custom = RouteDoc::new(axum::http::Method::GET, &custom_path);
// Standard OpenAI compatible list models endpoint // Standard OpenAI compatible list models endpoint
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// limitations under the License. // limitations under the License.
use anyhow::Result; use anyhow::Result;
use dynemo_runtime::{component::Component, component::Namespace, DistributedRuntime}; use dynamo_runtime::{component::Component, component::Namespace, DistributedRuntime};
use futures::stream::StreamExt; 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;
...@@ -67,7 +67,7 @@ impl KvRouter { ...@@ -67,7 +67,7 @@ impl KvRouter {
} }
pub async fn new( pub async fn new(
nats_client: dynemo_runtime::transports::nats::Client, nats_client: dynamo_runtime::transports::nats::Client,
service_name: String, service_name: String,
kv_subject: String, kv_subject: String,
namespace: Namespace, namespace: Namespace,
...@@ -141,7 +141,7 @@ impl KvRouter { ...@@ -141,7 +141,7 @@ impl KvRouter {
} }
async fn collect_endpoints( async fn collect_endpoints(
nats_client: dynemo_runtime::transports::nats::Client, nats_client: dynamo_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,
......
...@@ -19,7 +19,7 @@ pub use crate::kv_router::protocols::ForwardPassMetrics; ...@@ -19,7 +19,7 @@ pub use crate::kv_router::protocols::ForwardPassMetrics;
use crate::kv_router::scheduler::{Endpoint, Service}; use crate::kv_router::scheduler::{Endpoint, Service};
use crate::kv_router::ProcessedEndpoints; use crate::kv_router::ProcessedEndpoints;
use dynemo_runtime::component::Component; use dynamo_runtime::component::Component;
use std::time::Duration; use std::time::Duration;
use tokio_util::sync::CancellationToken; use tokio_util::sync::CancellationToken;
...@@ -81,7 +81,7 @@ impl KvMetricsAggregator { ...@@ -81,7 +81,7 @@ impl KvMetricsAggregator {
} }
async fn collect_endpoints( async fn collect_endpoints(
nats_client: dynemo_runtime::transports::nats::Client, nats_client: dynamo_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,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
use crate::kv_router::{indexer::RouterEvent, protocols::*, KV_EVENT_SUBJECT}; use crate::kv_router::{indexer::RouterEvent, protocols::*, KV_EVENT_SUBJECT};
use async_trait::async_trait; use async_trait::async_trait;
use dynemo_runtime::{ use dynamo_runtime::{
component::Component, component::Component,
pipeline::{ pipeline::{
network::Ingress, AsyncEngine, AsyncEngineContextProvider, ManyOut, ResponseStream, network::Ingress, AsyncEngine, AsyncEngineContextProvider, ManyOut, ResponseStream,
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use dynemo_runtime::component::Namespace; use dynamo_runtime::component::Namespace;
use dynemo_runtime::traits::events::EventPublisher; use dynamo_runtime::traits::events::EventPublisher;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::borrow::BorrowMut; use std::borrow::BorrowMut;
use std::cmp::min; use std::cmp::min;
......
...@@ -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 dynemo_runtime::pipeline::network::{ use dynamo_runtime::pipeline::network::{
ingress::push_endpoint::PushEndpoint, ingress::push_endpoint::PushEndpoint,
PushWorkHandler, PushWorkHandler,
}; };
use dynemo_runtime::transports::nats::{self, ServiceExt}; use dynamo_runtime::transports::nats::{self, ServiceExt};
use tokio::sync::watch; use tokio::sync::watch;
use tokio_util::sync::CancellationToken; use tokio_util::sync::CancellationToken;
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//! # Dynemo LLM //! # Dynamo LLM
//! //!
//! The `dynemo-llm` crate is a Rust library that provides a set of traits and types for building //! The `dynamo.llm` crate is a Rust library that provides a set of traits and types for building
//! distributed LLM inference solutions. //! distributed LLM inference solutions.
pub mod backend; pub mod backend;
......
...@@ -37,7 +37,7 @@ use std::time::Duration; ...@@ -37,7 +37,7 @@ use std::time::Duration;
use derive_builder::Builder; use derive_builder::Builder;
use dynemo_runtime::slug::Slug; use dynamo_runtime::slug::Slug;
pub const BUCKET_NAME: &str = "mdc"; pub const BUCKET_NAME: &str = "mdc";
......
...@@ -35,11 +35,11 @@ use tracing; ...@@ -35,11 +35,11 @@ use tracing;
use crate::model_card::model::{ModelDeploymentCard, ModelInfo, TokenizerKind}; use crate::model_card::model::{ModelDeploymentCard, ModelInfo, TokenizerKind};
use crate::preprocessor::prompt::OAIChatLikeRequest; use crate::preprocessor::prompt::OAIChatLikeRequest;
use dynemo_runtime::engine::{AsyncEngine, AsyncEngineContextProvider, ResponseStream}; use dynamo_runtime::engine::{AsyncEngine, AsyncEngineContextProvider, ResponseStream};
use dynemo_runtime::pipeline::{ use dynamo_runtime::pipeline::{
async_trait, AsyncEngineContext, Error, ManyOut, Operator, SingleIn, async_trait, AsyncEngineContext, Error, ManyOut, Operator, SingleIn,
}; };
use dynemo_runtime::protocols::annotated::{Annotated, AnnotationsProvider}; use dynamo_runtime::protocols::annotated::{Annotated, AnnotationsProvider};
use crate::protocols::{ use crate::protocols::{
common::{SamplingOptionsProvider, StopConditionsProvider}, common::{SamplingOptionsProvider, StopConditionsProvider},
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//! # Dynemo LLM Protocols //! # Dynamo LLM Protocols
//! //!
//! This module contains the protocols, i.e. messages formats, used to exchange requests and responses //! This module contains the protocols, i.e. messages formats, used to exchange requests and responses
//! both publicly via the HTTP API and internally between Dynemo components. //! both publicly via the HTTP API and internally between Dynamo components.
//! //!
use futures::{Stream, StreamExt}; use futures::{Stream, StreamExt};
...@@ -33,10 +33,10 @@ pub type DataStream<T> = Pin<Box<dyn Stream<Item = T> + Send + Sync>>; ...@@ -33,10 +33,10 @@ pub type DataStream<T> = Pin<Box<dyn Stream<Item = T> + Send + Sync>>;
// TODO: This is an awkward dependency that we need to address // TODO: This is an awkward dependency that we need to address
// Originally, all the Annotated/SSE Codec bits where in the LLM protocol module; however, [Annotated] // Originally, all the Annotated/SSE Codec bits where in the LLM protocol module; however, [Annotated]
// has become the common response envelope for dynemo-distributed. // has become the common response envelope for dynamo.
// We may want to move the original Annotated back here and has a Infallible conversion to the the // We may want to move the original Annotated back here and has a Infallible conversion to the the
// ResponseEnvelop in dynemo-distributed. // ResponseEnvelop in dynamo.
pub use dynemo_runtime::protocols::annotated::Annotated; pub use dynamo_runtime::protocols::annotated::Annotated;
/// The LLM responses have multiple different fields and nests of objects to get to the actual /// The LLM responses have multiple different fields and nests of objects to get to the actual
/// text completion returned. This trait can be applied to the `choice` level objects to extract /// text completion returned. This trait can be applied to the `choice` level objects to extract
......
...@@ -19,7 +19,7 @@ use serde::{Deserialize, Serialize}; ...@@ -19,7 +19,7 @@ use serde::{Deserialize, Serialize};
use super::{SamplingOptions, StopConditions}; use super::{SamplingOptions, StopConditions};
use crate::protocols::TokenIdType; use crate::protocols::TokenIdType;
/// [`PreprocessedRequest`] is the internal representation of an LLM request. The [`dynemo-llm-preprocessor`] /// [`PreprocessedRequest`] is the internal representation of an LLM request. The [`dynamo.llm-preprocessor`]
/// crate is responsible for converting request from the public APIs to this internal representation. /// crate is responsible for converting request from the public APIs to this internal representation.
#[derive(Serialize, Deserialize, Debug, Clone, Builder)] #[derive(Serialize, Deserialize, Debug, Clone, Builder)]
pub struct PreprocessedRequest { pub struct PreprocessedRequest {
......
...@@ -17,7 +17,7 @@ use super::nvext::NvExt; ...@@ -17,7 +17,7 @@ use super::nvext::NvExt;
use super::nvext::NvExtProvider; use super::nvext::NvExtProvider;
use super::OpenAISamplingOptionsProvider; use super::OpenAISamplingOptionsProvider;
use super::OpenAIStopConditionsProvider; use super::OpenAIStopConditionsProvider;
use dynemo_runtime::protocols::annotated::AnnotationsProvider; use dynamo_runtime::protocols::annotated::AnnotationsProvider;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use validator::Validate; use validator::Validate;
......
...@@ -31,7 +31,7 @@ use super::{ ...@@ -31,7 +31,7 @@ use super::{
CompletionUsage, ContentProvider, OpenAISamplingOptionsProvider, OpenAIStopConditionsProvider, CompletionUsage, ContentProvider, OpenAISamplingOptionsProvider, OpenAIStopConditionsProvider,
}; };
use dynemo_runtime::protocols::annotated::AnnotationsProvider; use dynamo_runtime::protocols::annotated::AnnotationsProvider;
#[derive(Serialize, Deserialize, Validate, Debug, Clone)] #[derive(Serialize, Deserialize, Validate, Debug, Clone)]
pub struct CompletionRequest { pub struct CompletionRequest {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#### HuggingFace Tokenizer #### HuggingFace Tokenizer
```rust ```rust
use dynemo_llm::tokenizers::hf::HuggingFaceTokenizer; use dynamo_llm::tokenizers::hf::HuggingFaceTokenizer;
let hf_tokenizer = HuggingFaceTokenizer::from_file("tests/data/sample-models/TinyLlama_v1.1/tokenizer.json") let hf_tokenizer = HuggingFaceTokenizer::from_file("tests/data/sample-models/TinyLlama_v1.1/tokenizer.json")
.expect("Failed to load HuggingFace tokenizer"); .expect("Failed to load HuggingFace tokenizer");
...@@ -22,7 +22,7 @@ let hf_tokenizer = HuggingFaceTokenizer::from_file("tests/data/sample-models/Tin ...@@ -22,7 +22,7 @@ let hf_tokenizer = HuggingFaceTokenizer::from_file("tests/data/sample-models/Tin
### Encoding and Decoding Text ### Encoding and Decoding Text
```rust ```rust
use dynemo_llm::tokenizers::{HuggingFaceTokenizer, traits::{Encoder, Decoder}}; use dynamo_llm::tokenizers::{HuggingFaceTokenizer, traits::{Encoder, Decoder}};
let tokenizer = HuggingFaceTokenizer::from_file("tests/data/sample-models/TinyLlama_v1.1/tokenizer.json") let tokenizer = HuggingFaceTokenizer::from_file("tests/data/sample-models/TinyLlama_v1.1/tokenizer.json")
.expect("Failed to load HuggingFace tokenizer"); .expect("Failed to load HuggingFace tokenizer");
...@@ -40,7 +40,7 @@ assert_eq!(text, decoded_text); ...@@ -40,7 +40,7 @@ assert_eq!(text, decoded_text);
// Using the Sequence object for encoding and decoding // Using the Sequence object for encoding and decoding
use dynemo_llm::tokenizers::{Sequence, Tokenizer}; use dynamo_llm::tokenizers::{Sequence, Tokenizer};
use std::sync::{Arc, RwLock}; use std::sync::{Arc, RwLock};
let tokenizer = Tokenizer::from(Arc::new(tokenizer)); let tokenizer = Tokenizer::from(Arc::new(tokenizer));
......
...@@ -19,7 +19,7 @@ pub use protocols::{Annotated, TokenIdType}; ...@@ -19,7 +19,7 @@ pub use protocols::{Annotated, TokenIdType};
pub mod openai { pub mod openai {
use super::*; use super::*;
use dynemo_runtime::pipeline::{ServerStreamingEngine, UnaryEngine}; use dynamo_runtime::pipeline::{ServerStreamingEngine, UnaryEngine};
pub mod completions { pub mod completions {
use super::*; use super::*;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use dynemo_llm::protocols::{ use dynamo_llm::protocols::{
codec::{create_message_stream, Message, SseCodecError}, codec::{create_message_stream, Message, SseCodecError},
openai::{chat_completions::NvCreateChatCompletionResponse, completions::CompletionResponse}, openai::{chat_completions::NvCreateChatCompletionResponse, completions::CompletionResponse},
ContentProvider, DataStream, ContentProvider, DataStream,
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use dynemo_llm::backend::Backend; use dynamo_llm::backend::Backend;
use dynemo_llm::model_card::model::ModelDeploymentCard; use dynamo_llm::model_card::model::ModelDeploymentCard;
#[tokio::test] #[tokio::test]
async fn test_sequence_factory() { async fn test_sequence_factory() {
......
...@@ -15,20 +15,20 @@ ...@@ -15,20 +15,20 @@
use anyhow::Error; use anyhow::Error;
use async_stream::stream; use async_stream::stream;
use dynemo_llm::http::service::{ use dynamo_llm::http::service::{
error::HttpError, error::HttpError,
metrics::{Endpoint, RequestType, Status}, metrics::{Endpoint, RequestType, Status},
service_v2::HttpService, service_v2::HttpService,
Metrics, Metrics,
}; };
use dynemo_llm::protocols::{ use dynamo_llm::protocols::{
openai::{ openai::{
chat_completions::{NvCreateChatCompletionRequest, NvCreateChatCompletionStreamResponse}, chat_completions::{NvCreateChatCompletionRequest, NvCreateChatCompletionStreamResponse},
completions::{CompletionRequest, CompletionResponse}, completions::{CompletionRequest, CompletionResponse},
}, },
Annotated, Annotated,
}; };
use dynemo_runtime::{ use dynamo_runtime::{
pipeline::{ pipeline::{
async_trait, AsyncEngine, AsyncEngineContextProvider, ManyOut, ResponseStream, SingleIn, async_trait, AsyncEngine, AsyncEngineContextProvider, ManyOut, ResponseStream, SingleIn,
}, },
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use dynemo_llm::model_card::model::{ModelDeploymentCard, PromptFormatterArtifact, TokenizerKind}; use dynamo_llm::model_card::model::{ModelDeploymentCard, PromptFormatterArtifact, TokenizerKind};
use tempfile::tempdir; use tempfile::tempdir;
const HF_PATH: &str = "tests/data/sample-models/TinyLlama_v1.1"; const HF_PATH: &str = "tests/data/sample-models/TinyLlama_v1.1";
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// limitations under the License. // limitations under the License.
use async_openai::types::CreateCompletionRequestArgs; use async_openai::types::CreateCompletionRequestArgs;
use dynemo_llm::protocols::openai::{self, completions::CompletionRequest}; use dynamo_llm::protocols::openai::{self, completions::CompletionRequest};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone)] #[derive(Serialize, Deserialize, Debug, Clone)]
......
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