diff --git a/candle-examples/examples/reinforcement-learning/ddpg.rs b/candle-examples/examples/reinforcement-learning/ddpg.rs index 5309eaf669..26d648472f 100644 --- a/candle-examples/examples/reinforcement-learning/ddpg.rs +++ b/candle-examples/examples/reinforcement-learning/ddpg.rs @@ -1,5 +1,4 @@ use std::collections::VecDeque; -use std::fmt::Display; use candle::{DType, Device, Error, Module, Result, Tensor, Var}; use candle_nn::{ diff --git a/candle-examples/examples/reinforcement-learning/gym_env.rs b/candle-examples/examples/reinforcement-learning/gym_env.rs index a2b6652f87..05518b1bf1 100644 --- a/candle-examples/examples/reinforcement-learning/gym_env.rs +++ b/candle-examples/examples/reinforcement-learning/gym_env.rs @@ -1,4 +1,3 @@ -#![allow(unused)] //! Wrappers around the Python API of Gymnasium (the new version of OpenAI gym) use candle::{Device, Result, Tensor}; use pyo3::prelude::*; diff --git a/candle-examples/examples/reinforcement-learning/main.rs b/candle-examples/examples/reinforcement-learning/main.rs index 1a25cd93ef..34115b228a 100644 --- a/candle-examples/examples/reinforcement-learning/main.rs +++ b/candle-examples/examples/reinforcement-learning/main.rs @@ -1,5 +1,3 @@ -#![allow(unused)] - #[cfg(feature = "mkl")] extern crate intel_mkl_src; diff --git a/candle-examples/examples/reinforcement-learning/policy_gradient.rs b/candle-examples/examples/reinforcement-learning/policy_gradient.rs index 6c355fe62f..3ae2617d16 100644 --- a/candle-examples/examples/reinforcement-learning/policy_gradient.rs +++ b/candle-examples/examples/reinforcement-learning/policy_gradient.rs @@ -14,7 +14,7 @@ fn new_model( ) -> Result<(impl Module, VarMap)> { let input_size = input_shape.iter().product(); - let mut varmap = VarMap::new(); + let varmap = VarMap::new(); let var_builder = VarBuilder::from_varmap(&varmap, dtype, device); let model = seq() diff --git a/candle-examples/examples/reinforcement-learning/vec_gym_env.rs b/candle-examples/examples/reinforcement-learning/vec_gym_env.rs index e382ad76da..65f67f74ce 100644 --- a/candle-examples/examples/reinforcement-learning/vec_gym_env.rs +++ b/candle-examples/examples/reinforcement-learning/vec_gym_env.rs @@ -1,8 +1,6 @@ -#![allow(unused)] //! Vectorized version of the gym environment. use candle::{DType, Device, Result, Tensor}; use pyo3::prelude::*; -use pyo3::types::PyDict; #[derive(Debug)] pub struct Step { diff --git a/candle-transformers/src/models/encodec.rs b/candle-transformers/src/models/encodec.rs index a8d509ce8b..517b9b1d7e 100644 --- a/candle-transformers/src/models/encodec.rs +++ b/candle-transformers/src/models/encodec.rs @@ -4,9 +4,8 @@ //! //! Based on implementation from [huggingface/transformers](https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/modeling_encodec.py) -#![allow(unused)] use candle::{DType, IndexOp, Layout, Module, Result, Shape, Tensor, D}; -use candle_nn::{conv1d, Conv1d, Conv1dConfig, ConvTranspose1d, VarBuilder}; +use candle_nn::{conv1d, Conv1d, ConvTranspose1d, VarBuilder}; // Encodec Model // https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/modeling_encodec.py @@ -226,6 +225,7 @@ impl candle::CustomOp2 for CodebookEncode { } // https://github.com/huggingface/transformers/blob/abaca9f9432a84cfaa95531de4c72334f38a42f2/src/transformers/models/encodec/modeling_encodec.py#L340 +#[allow(unused)] #[derive(Clone, Debug)] pub struct EuclideanCodebook { inited: Tensor, diff --git a/candle-transformers/src/models/starcoder2.rs b/candle-transformers/src/models/starcoder2.rs index 833cb0679f..0df5990b89 100644 --- a/candle-transformers/src/models/starcoder2.rs +++ b/candle-transformers/src/models/starcoder2.rs @@ -15,7 +15,6 @@ //! - [Model Card](https://huggingface.co/bigcode/starcoder) //! -#![allow(unused)] use candle::{DType, Device, Module, Result, Tensor, D}; use candle_nn::{layer_norm, linear_b, LayerNorm, Linear, VarBuilder}; use std::sync::Arc;