Skip to content

Commit cd90398

Browse files
authored
[Feature] Allow for actions and rewards to be in the reset tensordict (#458)
1 parent 8c313c8 commit cd90398

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchrl/envs/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ def reset(
367367
tensordict_reset = step_tensordict(
368368
tensordict_reset,
369369
exclude_done=False,
370-
exclude_reward=True,
371-
exclude_action=True,
370+
exclude_reward=False, # some policies may need reward and action at reset time
371+
exclude_action=False,
372372
)
373373
if tensordict is not None:
374374
tensordict.update(tensordict_reset)

0 commit comments

Comments
 (0)