Skip to content

Commit

Permalink
[Documentation] Correct MaskedEnv Example in ActionMask Transform Doc…
Browse files Browse the repository at this point in the history
…umentation (#2060)
  • Loading branch information
Jonathanace authored Apr 7, 2024
1 parent 2461eb2 commit f85da4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchrl/envs/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6676,7 +6676,7 @@ class ActionMask(Transform):
... self.observation_spec = CompositeSpec(obs=UnboundedContinuousTensorSpec(3))
... self.reward_spec = UnboundedContinuousTensorSpec(1)
...
... def _reset(self, data):
... def _reset(self, tensordict=None):
... td = self.observation_spec.rand()
... td.update(torch.ones_like(self.state_spec.rand()))
... return td
Expand Down

0 comments on commit f85da4c

Please sign in to comment.