Skip to content

Commit

Permalink
Remove some unused macros.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Nov 15, 2024
1 parent f689ce5 commit 3c16d72
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion candle-examples/examples/reinforcement-learning/ddpg.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::collections::VecDeque;
use std::fmt::Display;

use candle::{DType, Device, Error, Module, Result, Tensor, Var};
use candle_nn::{
Expand Down
1 change: 0 additions & 1 deletion candle-examples/examples/reinforcement-learning/gym_env.rs
Original file line number Diff line number Diff line change
@@ -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::*;
Expand Down
2 changes: 0 additions & 2 deletions candle-examples/examples/reinforcement-learning/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(unused)]

#[cfg(feature = "mkl")]
extern crate intel_mkl_src;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions candle-transformers/src/models/encodec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion candle-transformers/src/models/starcoder2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3c16d72

Please sign in to comment.