Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (A)syncVectorEnv support for sub-envs with different observation spaces #1140

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

pseudo-rnd-thoughts
Copy link
Member

Description

In order to add Meta-World environments to use the Sync/Async Gymnasium methods, a change needed to be made in order to batch observations that have different low/high values.

This change allows the user to specify one of 3 modes for batching observations:

  • 'same': current method of having the same observation space for all environments
  • 'different': method that allows for different observation spaces to be batched together, given the observation spaces are the same size
  • tuple[gym.Space, gym.Space] object: allows the user to input a specific method not covered by the 2 above modes to define themselves what the observation and single observation spaces are.

For 'same', sub-environment are tested to check they are all the equivalent
For 'different' and custom spaces, sub-environment are tested to check they share a common dtype and shape

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit 64fac8e into main Aug 29, 2024
23 checks passed
@pseudo-rnd-thoughts pseudo-rnd-thoughts deleted the batched_space branch August 30, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants