Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ahtsan committed May 27, 2019
1 parent 65ba792 commit d20932e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion garage/tf/policies/gaussian_lstm_policy_with_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(self,
if not isinstance(env_spec.action_space, akro.tf.Box):
raise ValueError('GaussianLSTMPolicy only works with '
'akro.tf.Box action space, but not {}'.format(
type(env_spec.action_space)))
env_spec.action_space))
super().__init__(name, env_spec)
self._obs_dim = env_spec.observation_space.flat_dim
self._action_dim = env_spec.action_space.flat_dim
Expand Down
4 changes: 3 additions & 1 deletion tests/garage/tf/algos/test_ppo_with_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def test_ppo_pendulum_with_model(self):
env.close()

test_ppo_pendulum_with_model.large = True

def test_ppo_pendulum_recurrent_with_model(self):
"""Test PPO with Pendulum environment and recurrent policy."""
with LocalRunner() as runner:
Expand All @@ -63,10 +64,11 @@ def test_ppo_pendulum_recurrent_with_model(self):
discount=0.99,
lr_clip_range=0.01,
optimizer_args=dict(batch_size=32, max_epochs=10),
plot=False,
)
runner.setup(algo, env)
last_avg_ret = runner.train(n_epochs=10, batch_size=2048)
assert last_avg_ret > 40

env.close()

test_ppo_pendulum_recurrent_with_model.large = True

0 comments on commit d20932e

Please sign in to comment.