feat(reco): port SuggestionsEngine (direct-weight ranking + quality gates)
T5: 1:1 port of the artist_vectors SuggestionsEngine into qbz-reco (~880 lines; structure matches the Tauri source function-for-function). generate_suggestions: ensure each seed vector (builder.ensure_vector), gate on a non-empty combined playlist vector, rank candidates by DIRECT summed relationship weight via store.get_all_related_artists (NOT cosine/find_nearest, D3), then pull + dedup + exclude tracks from Qobuz with the validate_qobuz_artist + has_incompatible_genre gates and optional reason strings. Keeps Tauri's Arc<Mutex>/RwLock ownership (Send-safe). DTO reconciliation: crate::api -> qbz_qobuz::QobuzClient + qbz_models::Track (4 Qobuz calls mapped to real signatures, field-by-field). Adds rand (0.10, workspace) + qbz-models deps. 23 qbz-reco tests green. cc
This commit is contained in:
4 files changed
+1138
No files matched your search
Generated
+2
@@ -5823,7 +5823,9 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"qbz-integrations",
|
||||
"qbz-models",
|
||||
"qbz-qobuz",
|
||||
"rand 0.10.1",
|
||||
"rusqlite",
|
||||
"serde",
|
||||
"tokio",
|
||||
|
||||
@@ -10,5 +10,7 @@ serde = { workspace = true }
|
||||
rusqlite = { version = "0.31", features = ["bundled"] }
|
||||
log = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
qbz-models = { path = "../qbz-models" }
|
||||
qbz-qobuz = { path = "../qbz-qobuz" }
|
||||
qbz-integrations = { path = "../qbz-integrations" }
|
||||
@@ -11,9 +11,13 @@
|
||||
mod builder;
|
||||
mod sparse_vector;
|
||||
mod store;
|
||||
mod suggestions;
|
||||
mod weights;
|
||||
|
||||
pub use builder::{ArtistVectorBuilder, BuildResult};
|
||||
pub use sparse_vector::SparseVector;
|
||||
pub use store::{ArtistVectorStore, SimilarArtist, VECTOR_TTL_SECS};
|
||||
pub use suggestions::{
|
||||
extract_artist_mbids, SuggestedTrack, SuggestionConfig, SuggestionResult, SuggestionsEngine,
|
||||
};
|
||||
pub use weights::RelationshipWeights;
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user