We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f4c7da commit 6b0d5b8Copy full SHA for 6b0d5b8
torchrl/envs/gym_like.py
@@ -293,7 +293,8 @@ def read_obs(
293
294
def _step(self, tensordict: TensorDictBase) -> TensorDictBase:
295
if len(self.action_keys) == 1:
296
- action = tensordict.get(self.action_key)
+ # Use brackets to get non-tensor data
297
+ action = tensordict[self.action_key]
298
else:
299
action = tensordict.select(*self.action_keys).to_dict()
300
if self._convert_actions_to_numpy:
0 commit comments