diff options
Diffstat (limited to 'candle-examples/examples/reinforcement-learning/vec_gym_env.rs')
-rw-r--r-- | candle-examples/examples/reinforcement-learning/vec_gym_env.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/candle-examples/examples/reinforcement-learning/vec_gym_env.rs b/candle-examples/examples/reinforcement-learning/vec_gym_env.rs index e382ad76..a985d9e9 100644 --- a/candle-examples/examples/reinforcement-learning/vec_gym_env.rs +++ b/candle-examples/examples/reinforcement-learning/vec_gym_env.rs @@ -1,9 +1,8 @@ -#![allow(unused)] //! Vectorized version of the gym environment. use candle::{DType, Device, Result, Tensor}; use pyo3::prelude::*; -use pyo3::types::PyDict; +#[allow(unused)] #[derive(Debug)] pub struct Step { pub obs: Tensor, @@ -11,6 +10,7 @@ pub struct Step { pub is_done: Tensor, } +#[allow(unused)] pub struct VecGymEnv { env: PyObject, action_space: usize, @@ -21,6 +21,7 @@ fn w(res: PyErr) -> candle::Error { candle::Error::wrap(res) } +#[allow(unused)] impl VecGymEnv { pub fn new(name: &str, img_dir: Option<&str>, nprocesses: usize) -> Result<VecGymEnv> { Python::with_gil(|py| { |