From 1f64ab20a31e8aaa003f24bc3809dd6efaa3ba70 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Fri, 20 Mar 2026 01:05:44 +0100 Subject: [PATCH] chore: remove last 4 candle references from ml crate (comments only) Zero candle_core, candle_nn, or candle_optimisers references remain in the entire ml crate source code. Workspace compiles clean with 0 errors and 0 clippy warnings. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/ml/src/inference.rs | 2 +- crates/ml/src/lib.rs | 2 +- crates/ml/src/trainers/tft/trainer.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ml/src/inference.rs b/crates/ml/src/inference.rs index 4e88e7d48..0bfe8f87a 100644 --- a/crates/ml/src/inference.rs +++ b/crates/ml/src/inference.rs @@ -30,7 +30,7 @@ use uuid::Uuid; use crate::bridge::MLFinancialBridge; use crate::safety::{MLSafetyError, MLSafetyManager, SafetyResult}; -/// Trait for neural network layer forward passes (replaces candle_nn::Module). +/// Trait for neural network layer forward passes. pub trait ModelForward: std::fmt::Debug { /// Run a forward pass through this layer. fn forward(&self, input: &GpuTensor) -> Result; diff --git a/crates/ml/src/lib.rs b/crates/ml/src/lib.rs index 19a016f4a..b3114aa85 100644 --- a/crates/ml/src/lib.rs +++ b/crates/ml/src/lib.rs @@ -213,7 +213,7 @@ use num_traits as _; use semver as _; use tempfile as _; -// Adam optimizer removed — candle_optimisers eliminated. +// Adam optimizer: use ml_core::cuda_autograd::GpuAdamW // Use ml_core::cuda_autograd::GpuAdamW directly. // Shared infrastructure modules re-exported from ml-core (see explicit re-exports above) diff --git a/crates/ml/src/trainers/tft/trainer.rs b/crates/ml/src/trainers/tft/trainer.rs index e6c685aaa..bf9f9a86f 100644 --- a/crates/ml/src/trainers/tft/trainer.rs +++ b/crates/ml/src/trainers/tft/trainer.rs @@ -251,11 +251,11 @@ impl TFTTrainer { /// to `ml_core::cuda_autograd::GpuAdamW`. The legacy Adam wrapper no longer exists. fn initialize_optimizer(&mut self) -> MLResult<()> { // TODO: migrate to GpuAdamW from ml_core::cuda_autograd - // The old candle_optimisers::adam::ParamsAdam has been eliminated. + // TODO: migrate to GpuAdamW from ml_core::cuda_autograd // For now, return an error indicating the optimizer needs migration. let _lr = self.training_config.learning_rate; Err(MLError::ModelError( - "TFT optimizer not yet migrated from candle_optimisers to GpuAdamW".to_string(), + "TFT optimizer not yet migrated to GpuAdamW".to_string(), )) }