diff --git a/crates/_types/enums/src/by_table/generic_synthetic_ids/id_category.rs b/crates/_types/enums/src/by_table/generic_synthetic_ids/id_category.rs index 158700858d..ca1b502e14 100644 --- a/crates/_types/enums/src/by_table/generic_synthetic_ids/id_category.rs +++ b/crates/_types/enums/src/by_table/generic_synthetic_ids/id_category.rs @@ -133,7 +133,7 @@ mod tests { fn all_variants() { // Static check let mut variants = IdCategory::all_variants(); - assert_eq!(variants.len(), 6); + assert_eq!(variants.len(), 7); assert_eq!(variants.pop_first(), Some(IdCategory::MediaFile)); assert_eq!(variants.pop_first(), Some(IdCategory::LipsyncAnimationResult)); assert_eq!(variants.pop_first(), Some(IdCategory::VoiceConversionResult)); diff --git a/crates/cli/dev_database_seed/src/main.rs b/crates/cli/dev_database_seed/src/main.rs index ed29579867..7dfaf13a32 100644 --- a/crates/cli/dev_database_seed/src/main.rs +++ b/crates/cli/dev_database_seed/src/main.rs @@ -5,19 +5,14 @@ use sqlx::mysql::MySqlPoolOptions; use config::shared_constants::{DEFAULT_MYSQL_CONNECTION_STRING, DEFAULT_RUST_LOG}; use errors::AnyhowResult; - -use crate::seeding::model_weights::seed_weights; -use crate::seeding::model_weights::seed_weights_for_user_token; - use crate::bucket_clients::get_bucket_clients; use crate::cli_args::parse_cli_args; +use crate::seeding::model_weights::seed_weights; use crate::seeding::tts_tacotron2::seed_tts_tacotron2; - use crate::seeding::users::seed_user_accounts; use crate::seeding::voice_conversion::seed_voice_conversion; use crate::seeding::zero_shot_tts::seed_zero_shot_tts; - pub mod bucket_clients; pub mod cli_args; diff --git a/crates/lib/mysql_queries/src/queries/model_weights/list_weights_by_user.rs b/crates/lib/mysql_queries/src/queries/model_weights/list_weights_by_user.rs index 49d5e52155..71c0e9f43a 100644 --- a/crates/lib/mysql_queries/src/queries/model_weights/list_weights_by_user.rs +++ b/crates/lib/mysql_queries/src/queries/model_weights/list_weights_by_user.rs @@ -1,19 +1,13 @@ +use chrono::{DateTime, Utc}; +use sqlx::{Acquire, MySqlConnection, MySqlPool}; -use anyhow::anyhow; -use chrono::{ DateTime, Utc }; -use enums::by_table::model_weights::weights_types; -use log::{ info, warn }; -use sqlx::{ MySql, MySqlPool, query, Acquire, MySqlConnection }; -use sqlx::pool::PoolConnection; - +use enums::by_table::model_weights::{ + weights_category::WeightsCategory, + weights_types::WeightsType, +}; use enums::common::visibility::Visibility; use errors::AnyhowResult; use tokens::tokens::model_weights::ModelWeightToken; - -use enums::by_table::model_weights::{ - weights_types::WeightsType, - weights_category::WeightsCategory, -}; use tokens::tokens::users::UserToken; #[derive(Serialize)] @@ -136,7 +130,7 @@ async fn get_raw_weights_by_creator_username( "#, creator_username).fetch_all(connection) .await?; - return Ok(raw_weights); + Ok(raw_weights) } else { let raw_weights: Vec = sqlx::query_as!( RawWeightJoinUser, diff --git a/crates/lib/mysql_queries/src/queries/model_weights/update_weight.rs b/crates/lib/mysql_queries/src/queries/model_weights/update_weight.rs index ba84497b52..cbe0ba55d7 100644 --- a/crates/lib/mysql_queries/src/queries/model_weights/update_weight.rs +++ b/crates/lib/mysql_queries/src/queries/model_weights/update_weight.rs @@ -1,15 +1,10 @@ use anyhow::anyhow; use sqlx::MySqlPool; -use log::info; -use sqlx::mysql::MySqlPoolOptions; - use enums::common::visibility::Visibility; use errors::AnyhowResult; use tokens::tokens::model_weights::ModelWeightToken; -use config::shared_constants::{DEFAULT_MYSQL_CONNECTION_STRING, DEFAULT_RUST_LOG}; - pub struct UpdateWeightArgs<'a> { pub weight_token: &'a ModelWeightToken, pub title: Option<&'a str>, @@ -58,13 +53,13 @@ pub async fn update_weights(args: UpdateWeightArgs<'_>) -> AnyhowResult<()> { #[cfg(test)] mod tests { - - use tokio; - // Template + // Template use sqlx::mysql::MySqlPoolOptions; + use tokio; - use config::shared_constants::{DEFAULT_MYSQL_CONNECTION_STRING}; + use config::shared_constants::DEFAULT_MYSQL_CONNECTION_STRING; use errors::AnyhowResult; + #[tokio::test] async fn test_update_weights() -> AnyhowResult<()> { let db_connection_string = DEFAULT_MYSQL_CONNECTION_STRING; diff --git a/crates/service/job/inference_job/src/job/job_types/tts/tacotron2_v2_early_fakeyou/virtual_lfu_cache.rs b/crates/service/job/inference_job/src/job/job_types/tts/tacotron2_v2_early_fakeyou/virtual_lfu_cache.rs index 2512bfdb48..fa9171b3e6 100644 --- a/crates/service/job/inference_job/src/job/job_types/tts/tacotron2_v2_early_fakeyou/virtual_lfu_cache.rs +++ b/crates/service/job/inference_job/src/job/job_types/tts/tacotron2_v2_early_fakeyou/virtual_lfu_cache.rs @@ -107,7 +107,7 @@ impl SyncVirtualLfuCache { #[cfg(test)] pub mod tests { - use crate::caching::virtual_lfu_cache::VirtualLfuCache; + use crate::job::job_types::tts::tacotron2_v2_early_fakeyou::virtual_lfu_cache::VirtualLfuCache; #[test] fn large_capacity_does_not_shed() {