You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorting the dictionary's entries it's probably not always wanted, but unfortunately there is no way around it other than overwriting self.spaces after initializing a spaces.Dict. It would be handy to make this optional, maybe with default parameter for backwards compatibility if needed.
@MischaPanch even by resetting self.spaces after initializing the dict space, it will again brake the order when using any ObsWrapper, for example FrameStackObservation
@carlocagnetta Interesting suggestions, similarly I don't like needing to sort the dictionary data as it is a product of technical debt when python dictionaries weren't insertion sorted.
I agree, that adding an argument would solve this issue.
Sorting the dictionary's entries it's probably not always wanted, but unfortunately there is no way around it other than overwriting
self.spaces
after initializing aspaces.Dict
. It would be handy to make this optional, maybe with default parameter for backwards compatibility if needed.https://github.com/Farama-Foundation/Gymnasium/blame/0607994d37a8079945ed0e0416ff750a3ad2e26f/gymnasium/spaces/dict.py#L73
The text was updated successfully, but these errors were encountered: