From 6c93faa7d41b7ac5ceb7ce670fce73603bbbf406 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Sat, 2 May 2026 11:11:02 +0200 Subject: [PATCH] =?UTF-8?q?fix(services):=20keep=20`cuda`=20feature=20on?= =?UTF-8?q?=20ml=20dep=20=E2=80=94=20services=20were=20pulling=20default-f?= =?UTF-8?q?eatures=20which=20included=20cuda;=20my=20prior=20commit=20drop?= =?UTF-8?q?ped=20both=20default-features=3Dfalse=20AND=20added=20only=20`f?= =?UTF-8?q?inancial`,=20breaking=20compile.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ml's source references cudarc unconditionally (cudarc::driver::CudaSlice etc. are not behind #[cfg(feature = "cuda")]). With `cuda` feature off, cudarc is not pulled in, leading to 722 unresolved-module errors. Add `cuda` explicitly to the features list. The 8 leaf sub-crates (ml-backtesting, ml-paper-trading, etc.) stay dropped — the win on service compile time is preserved. Real fix is to gate cudarc references in crates/ml/src/ behind `#[cfg(feature = "cuda")]`, but that's a separate refactor. --- services/backtesting_service/Cargo.toml | 2 +- services/trading_service/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/backtesting_service/Cargo.toml b/services/backtesting_service/Cargo.toml index a9f069950..ff478f76d 100644 --- a/services/backtesting_service/Cargo.toml +++ b/services/backtesting_service/Cargo.toml @@ -72,7 +72,7 @@ clap = { version = "4.5", features = ["derive"] } # path-form: cargo 1.89's `workspace = true` ignores `default-features = false`, # so we use the explicit path declaration to opt out of `full-stack` and drop # 8 leaf-level ml-* sub-crates that no source file in this service references. -ml = { path = "../../crates/ml", default-features = false, features = ["financial"] } +ml = { path = "../../crates/ml", default-features = false, features = ["financial", "cuda"] } data.workspace = true common = { workspace = true, features = ["database"] } diff --git a/services/trading_service/Cargo.toml b/services/trading_service/Cargo.toml index 921f26d81..4339e026f 100644 --- a/services/trading_service/Cargo.toml +++ b/services/trading_service/Cargo.toml @@ -84,7 +84,7 @@ risk.workspace = true # 8 leaf-level ml-* sub-crates (ml-backtesting, ml-paper-trading, ml-stress-testing, # ml-explainability, ml-universe, ml-regime-detection, ml-validation, # ml-data-validation) that no source file in this service references. -ml = { path = "../../crates/ml", default-features = false, features = ["financial"] } +ml = { path = "../../crates/ml", default-features = false, features = ["financial", "cuda"] } data.workspace = true common = { workspace = true, features = ["database"] } config = { workspace = true, features = ["postgres"] }