Skip to content

Commit

Permalink
Use max episode length eval in sac evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
Avnish Narayan authored and mergify-bot committed Aug 19, 2020
1 parent bb77db7 commit ccf66fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/torch/sac_half_cheetah_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def sac_half_cheetah_batch(ctxt=None, seed=1):
qf2=qf2,
gradient_steps_per_itr=1000,
max_episode_length=500,
max_episode_length_eval=1000,
replay_buffer=replay_buffer,
min_buffer_size=1e4,
target_update_tau=5e-3,
Expand Down
3 changes: 2 additions & 1 deletion src/garage/torch/algos/sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def __init__(
self._discount = discount
self._reward_scale = reward_scale
self.max_episode_length = max_episode_length
self._max_episode_length_eval = max_episode_length_eval
self._max_episode_length_eval = (max_episode_length_eval
or max_episode_length)

self.policy = policy
self.env_spec = env_spec
Expand Down

0 comments on commit ccf66fc

Please sign in to comment.