Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Cifko committed Apr 10, 2024
1 parent 0d5c8d8 commit 1fa6475
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions atoma-inference/src/models/candle/llama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ mod tests {
#[test]
fn test_llama_model_interface() {
let api_key = "".to_string();
let cache_dir: PathBuf = "./test_llama_cache_dir/".try_into().unwrap();
let cache_dir: PathBuf = "./test_llama_cache_dir/".into();
let model_id = "llama_tiny_llama_1_1b_chat".to_string();
let dtype = "f32".to_string();
let revision = "main".to_string();
Expand Down Expand Up @@ -249,7 +249,7 @@ mod tests {
panic!("Invalid device")
}

assert_eq!(model.cache.use_kv_cache, true);
assert!(model.cache.use_kv_cache);
assert_eq!(model.model_type, ModelType::LlamaTinyLlama1_1BChat);

let prompt = "Write a hello world rust program: ".to_string();
Expand All @@ -275,7 +275,7 @@ mod tests {
println!("output = {output}");

assert!(output.len() > 1);
assert!(output.split(" ").collect::<Vec<_>>().len() <= max_tokens);
assert!(output.split(' ').collect::<Vec<_>>().len() <= max_tokens);

std::fs::remove_dir_all(cache_dir).unwrap();
}
Expand Down
2 changes: 1 addition & 1 deletion atoma-inference/src/models/candle/mamba.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ mod tests {
#[test]
fn test_mamba_model_interface() {
let api_key = "".to_string();
let cache_dir: PathBuf = "./test_mamba_cache_dir/".try_into().unwrap();
let cache_dir: PathBuf = "./test_mamba_cache_dir/".into();
let model_id = "mamba_130m".to_string();
let dtype = "f32".to_string();
let revision = "refs/pr/1".to_string();
Expand Down
2 changes: 1 addition & 1 deletion atoma-inference/src/models/candle/stable_diffusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ mod tests {
#[tokio::test]
async fn test_stable_diffusion_model_interface() {
let api_key = "".to_string();
let cache_dir: PathBuf = "./test_sd_cache_dir/".try_into().unwrap();
let cache_dir: PathBuf = "./test_sd_cache_dir/".into();
let model_id = "stable_diffusion_v1-5".to_string();
let dtype = "f32".to_string();
let revision = "".to_string();
Expand Down

0 comments on commit 1fa6475

Please sign in to comment.