From ac5e5eff3b2f7e8bcf61b39661eda0be7822e4bc Mon Sep 17 00:00:00 2001 From: Matteo Bettini Date: Wed, 4 Sep 2024 15:17:00 +0200 Subject: [PATCH] amend --- torchrl/envs/libs/vmas.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/torchrl/envs/libs/vmas.py b/torchrl/envs/libs/vmas.py index 399f15562a6..22f9835303b 100644 --- a/torchrl/envs/libs/vmas.py +++ b/torchrl/envs/libs/vmas.py @@ -96,10 +96,9 @@ def _vmas_to_torchrl_spec_transform( ) elif isinstance(spec, gym_spaces.Dict): spec_out = {} - for k in spec.keys(): - key = k + for key in spec.keys(): spec_out[key] = _vmas_to_torchrl_spec_transform( - spec[k], + spec[key], device=device, categorical_action_encoding=categorical_action_encoding, )