Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Cifko committed Apr 5, 2024
1 parent 2589744 commit f3d1b29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion atoma-inference/src/model_thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub struct ModelThread<M: ModelTrait> {
receiver: mpsc::Receiver<ModelThreadCommand>,
}

impl<'a, M> ModelThread<M>
impl<M> ModelThread<M>
where
M: ModelTrait,
{
Expand Down
2 changes: 1 addition & 1 deletion atoma-inference/src/models/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub mod tests {
true,
vec![ModelConfig::new(
"Llama2_7b".to_string(),
PrecisionBits::F16,
serde_json::to_value(PrecisionBits::F16).unwrap(),
"".to_string(),
0,
)],
Expand Down
11 changes: 6 additions & 5 deletions atoma-inference/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ mod tests {
use std::io::Write;
use toml::{toml, Value};

use crate::{models::types::PrecisionBits, models::ModelId};
use crate::models::{ModelId, Request, Response};

use super::*;

Expand Down Expand Up @@ -196,14 +196,15 @@ mod tests {
type Input = ();
type Output = ();
type Fetch = ();
type Load = ();

fn fetch(_fetch: &Self::Fetch) -> Result<(), crate::models::ModelError> {
Ok(())
}

fn load(
_: Vec<PathBuf>,
_: PrecisionBits,
_: Self::Load,
_device_id: usize,
) -> Result<Self, crate::models::ModelError> {
Ok(Self {})
Expand Down Expand Up @@ -239,12 +240,12 @@ mod tests {
file.write_all(toml_string.as_bytes())
.expect("Failed to write to file");

let (_, req_receiver) = tokio::sync::mpsc::channel::<()>(1);
let (resp_sender, _) = tokio::sync::mpsc::channel::<()>(1);
let (_, req_receiver) = tokio::sync::mpsc::channel::<serde_json::Value>(1);
let (resp_sender, _) = tokio::sync::mpsc::channel::<serde_json::Value>(1);

let config = ModelsConfig::from_file_path(CONFIG_FILE_PATH.parse().unwrap());

let _ = ModelService::<(), ()>::start::<TestModelInstance, MockApi>(
let _ = ModelService::start::<TestModelInstance, MockApi>(
config,
private_key,
req_receiver,
Expand Down

0 comments on commit f3d1b29

Please sign in to comment.