[BUG] KeyError: 'action_key requested but more than one key present in the environment' when space.Dict
action_space
#2716
Labels
bug
Something isn't working
Describe the bug
I have a
gymnasium
environment of the form:I'm registering the environment then running:
But then seeing this error:
And, when I attempt to use a tuple instead:
I see another error:
The rollout succeeds when the
spaces.Box
instances have the exact same arguments, but it wasn't clear from the documentation that this was required. Only that they needed to have the same dimension anddtype
.Expected behavior
The documentation says to be cautious when using
spaces
but also says torch RL supportsspaces.Dict
andspaces.Tuple
. I would expect a rollout with either of these action spaces to succeed. Is there an idiomatic way to represent heterogeneous action spaces?System info
0.6.0 1.26.4 3.11.2 (v3.11.2:878ead1ac1, Feb 7 2023, 10:02:41) [Clang 13.0.0 (clang-1300.0.29.30)] darwin
The text was updated successfully, but these errors were encountered: