diff --git a/atoma-event-subscribe/sui/src/subscriber.rs b/atoma-event-subscribe/sui/src/subscriber.rs index 2ce71cf2..17df1928 100644 --- a/atoma-event-subscribe/sui/src/subscriber.rs +++ b/atoma-event-subscribe/sui/src/subscriber.rs @@ -1,4 +1,4 @@ -use std::{fmt::Write, path::Path, str::FromStr, time::Duration}; +use std::{path::Path, str::FromStr, time::Duration}; use futures::StreamExt; use serde_json::Value; @@ -16,7 +16,6 @@ use crate::AtomaEvent; use atoma_types::{InputSource, Request, SmallId, NON_SAMPLED_NODE_ERR}; /// The size of a request id, expressed in hex format -const REQUEST_ID_HEX_SIZE: usize = 64; const WAIT_FOR_INPUT_MANAGER_RESPONSE_SECS: u64 = 5; /// `SuiSubscriber` - Responsible for listening to events emitted from the Atoma smart contract diff --git a/atoma-inference/src/models/candle/stable_diffusion.rs b/atoma-inference/src/models/candle/stable_diffusion.rs index 18eb8e71..87ea2a6a 100644 --- a/atoma-inference/src/models/candle/stable_diffusion.rs +++ b/atoma-inference/src/models/candle/stable_diffusion.rs @@ -663,7 +663,7 @@ impl StableDiffusion { /// Pre-processes image fn image_preprocess>(path: T) -> Result { - let img = image::io::Reader::open(path)?.decode()?; + let img = image::ImageReader::open(path)?.decode()?; let (height, width) = (img.height() as usize, img.width() as usize); let height = height - height % 32; let width = width - width % 32; diff --git a/atoma-inference/src/service.rs b/atoma-inference/src/service.rs index 7d25285c..1fafc06b 100644 --- a/atoma-inference/src/service.rs +++ b/atoma-inference/src/service.rs @@ -147,7 +147,7 @@ pub enum ModelServiceError { #[cfg(test)] mod tests { - use atoma_types::PromptParams; + use atoma_types::{Digest, PromptParams}; use serde::Serialize; use std::io::Write; use toml::{toml, Value}; diff --git a/atoma-inference/src/tests/mod.rs b/atoma-inference/src/tests/mod.rs index 8629a1c3..05e28c79 100644 --- a/atoma-inference/src/tests/mod.rs +++ b/atoma-inference/src/tests/mod.rs @@ -145,7 +145,9 @@ async fn test_mock_model_thread() { let (response_sender, response_receiver) = oneshot::channel(); let max_tokens = i as u64; let prompt_params = PromptParams::Text2TextPromptParams(Text2TextPromptParams::new( - "".to_string(), + atoma_types::InputSource::Raw { + prompt: "".to_string(), + }, "".to_string(), 0.0, 1, diff --git a/atoma-input-manager/src/lib.rs b/atoma-input-manager/src/lib.rs index 01969bb5..0a4587f6 100644 --- a/atoma-input-manager/src/lib.rs +++ b/atoma-input-manager/src/lib.rs @@ -67,7 +67,7 @@ impl AtomaInputManager { }; oneshot .send(text) - .map_err(|e| AtomaInputManagerError::SendPromptError(e))?; + .map_err(AtomaInputManagerError::SendPromptError)?; } Ok(()) diff --git a/atoma-streamer/src/lib.rs b/atoma-streamer/src/lib.rs index d03575bd..a21f1377 100644 --- a/atoma-streamer/src/lib.rs +++ b/atoma-streamer/src/lib.rs @@ -97,7 +97,7 @@ impl AtomaStreamer { .map_err(|_| AtomaStreamerError::UrlError("URL is cannot-be-a-base".to_string()))?; path_segment.push("data"); path_segment.push(&request_id); - path_segment.push(&format!("response.json")); + path_segment.push("response.json"); } url.set_query(Some(&format!("auth={token}"))); info!("Firebase's output url: {:?}", url);