Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Feb 7, 2025
1 parent c6069fe commit 87a342c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torchrl/envs/gym_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ def read_obs(

def _step(self, tensordict: TensorDictBase) -> TensorDictBase:
if len(self.action_keys) == 1:
action = tensordict.get(self.action_key)
# Use brackets to get non-tensor data
action = tensordict[self.action_key]
else:
action = tensordict.select(*self.action_keys).to_dict()
if self._convert_actions_to_numpy:
Expand Down

0 comments on commit 87a342c

Please sign in to comment.