Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Feb 15, 2024
1 parent d84f13e commit e79ef5e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions torchrl/envs/batched_envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,6 @@ def step_and_maybe_reset(
# and this transform overrides an observation key (eg, CatFrames)
# the shape, dtype or device may not necessarily match and writing
# the value in-place will fail.
assert not self.shared_tensordict_parent.requires_grad
self.shared_tensordict_parent.update_(
tensordict, keys_to_update=self._env_input_keys
)
Expand Down Expand Up @@ -1224,7 +1223,6 @@ def _step(self, tensordict: TensorDictBase) -> TensorDictBase:
# and this transform overrides an observation key (eg, CatFrames)
# the shape, dtype or device may not necessarily match and writing
# the value in-place will fail.
assert not self.shared_tensordict_parent.requires_grad
self.shared_tensordict_parent.update_(
tensordict, keys_to_update=list(self._env_input_keys)
)
Expand Down

0 comments on commit e79ef5e

Please sign in to comment.