Skip to content

Commit

Permalink
Fix reward threshold in test_identity.py (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
araffin committed Mar 26, 2020
1 parent ac92d2e commit 950c2a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Bug Fixes:
- Fixed SAC/TD3 checking time to update on learn steps instead of total steps (@solliet)
- Added ``**kwarg`` pass through for ``reset`` method in ``atari_wrappers.FrameStack`` (@solliet)
- Fix consistency in ``setup_model()`` for SAC, ``target_entropy`` now uses ``self.action_space`` instead of ``self.env.action_space`` (@solliet)
- Fix reward threshold in ``test_identity.py``

Deprecations:
^^^^^^^^^^^^^
Expand Down
4 changes: 2 additions & 2 deletions tests/test_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_identity(model_name):
env = DummyVecEnv([lambda: IdentityEnv(10)])

model = LEARN_FUNC_DICT[model_name](env)
evaluate_policy(model, env, n_eval_episodes=20, reward_threshold=0.9)
evaluate_policy(model, env, n_eval_episodes=20, reward_threshold=90)

obs = env.reset()
assert model.action_probability(obs).shape == (1, 10), "Error: action_probability not returning correct shape"
Expand Down Expand Up @@ -72,6 +72,6 @@ def test_identity_continuous(model_class):
action_noise=action_noise, buffer_size=int(1e6))
model.learn(total_timesteps=20000)

evaluate_policy(model, env, n_eval_episodes=20, reward_threshold=0.9)
evaluate_policy(model, env, n_eval_episodes=20, reward_threshold=90)
# Free memory
del model, env

0 comments on commit 950c2a5

Please sign in to comment.