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
I propose that the framework is updated to allow frame stacks of size 1. This could be helpful for pipelines which might use frame stacks in some settings and omit them in others. By allowing frame stacks of size 1 the frame stack wrapper can be left in the code and automatically add the extra dimension for frame stacking.
As described above, this will enable cleaner code for several applications without causing any issues to existing ones. Also, this is consistent with previous versions of the gym frame stack wrapper.
Pitch
Just remove these lines or maybe assert stack-size > 0 instead
Hey, thanks for the suggestion, I originally included the >1 as I thought you wouldn't need ==1 but your motivation is good counter-argument.
If the tests work then I see no reason why we can't relax the assumption.
Could you make a PR for this?
Proposal
Hi,
I propose that the framework is updated to allow frame stacks of size 1. This could be helpful for pipelines which might use frame stacks in some settings and omit them in others. By allowing frame stacks of size 1 the frame stack wrapper can be left in the code and automatically add the extra dimension for frame stacking.
To implement this, simply remove these lines:
Gymnasium/gymnasium/wrappers/stateful_observation.py
Lines 377 to 380 in a4f1a93
Previous versions of the gym wrapper supported this: https://github.com/openai/gym/blob/master/gym/wrappers/frame_stack.py
Motivation
As described above, this will enable cleaner code for several applications without causing any issues to existing ones. Also, this is consistent with previous versions of the gym frame stack wrapper.
Pitch
Just remove these lines or maybe assert stack-size > 0 instead
https://github.com/Farama-Foundation/Gymnasium/blob/main/gymnasium/wrappers/stateful_observation.py#L377-L380
Alternatives
No response
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: