Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Mar 8, 2024
1 parent dbfffff commit a00dd12
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion torchrl/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2680,7 +2680,7 @@ def maybe_reset(self, tensordict: TensorDictBase) -> TensorDictBase:
"""
if self._simple_done:
done = tensordict._get_str("done", default=None)
tensordict._set_str("done", done.clone(), validated=True, inplace=False)
tensordict._set_str("_reset", done.clone(), validated=True, inplace=False)
any_done = done.any()
else:
any_done = _terminated_or_truncated(
Expand Down
1 change: 0 additions & 1 deletion torchrl/envs/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ def input_spec(self) -> TensorSpec:
def _step(self, tensordict: TensorDictBase) -> TensorDictBase:
# No need to clone here because inv does it already
# tensordict = tensordict.clone(False)

next_preset = tensordict.get("next", None)
tensordict_in = self.transform.inv(tensordict)
next_tensordict = self.base_env._step(tensordict_in)
Expand Down

0 comments on commit a00dd12

Please sign in to comment.