Skip to content

Commit

Permalink
fixes DQN run_n_episodes using the wrong environment variable (#525)
Browse files Browse the repository at this point in the history
* use argument variable instead of self variable

* chlog

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
  • Loading branch information
sidhantls and Borda committed Jan 18, 2021
1 parent 61d3a26 commit da35d3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -60,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed the end of batch size mismatch ([#389](https://github.com/PyTorchLightning/pytorch-lightning-bolts/pull/389))
- Fixed `batch_size` parameter for DataModules remaining ([#344](https://github.com/PyTorchLightning/pytorch-lightning-bolts/pull/344))
- Fixed CIFAR `num_samples` ([#432](https://github.com/PyTorchLightning/pytorch-lightning-bolts/pull/432))
- Fixed DQN `run_n_episodes` using the wrong environment variable ([#525](https://github.com/PyTorchLightning/pytorch-lightning-bolts/pull/525))

## [0.2.5] - 2020-10-12

Expand Down
2 changes: 1 addition & 1 deletion pl_bolts/models/rl/dqn_model.py
Expand Up @@ -171,7 +171,7 @@ def run_n_episodes(self, env, n_epsiodes: int = 1, epsilon: float = 1.0) -> List
while not done:
self.agent.epsilon = epsilon
action = self.agent(episode_state, self.device)
next_state, reward, done, _ = self.env.step(action[0])
next_state, reward, done, _ = env.step(action[0])
episode_state = next_state
episode_reward += reward

Expand Down

0 comments on commit da35d3d

Please sign in to comment.