Skip to content

Commit

Permalink
[Feature] Allow for actions and rewards to be in the reset tensordict (
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens authored Sep 16, 2022
1 parent 8c313c8 commit cd90398
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchrl/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ def reset(
tensordict_reset = step_tensordict(
tensordict_reset,
exclude_done=False,
exclude_reward=True,
exclude_action=True,
exclude_reward=False, # some policies may need reward and action at reset time
exclude_action=False,
)
if tensordict is not None:
tensordict.update(tensordict_reset)
Expand Down

0 comments on commit cd90398

Please sign in to comment.