Skip to content

Commit

Permalink
Use max episode length eval in sac evaluation (#1908)
Browse files Browse the repository at this point in the history
  • Loading branch information
avnishn authored Aug 20, 2020
1 parent eec1bb3 commit cc163fb
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 cc163fb

Please sign in to comment.