-
-
Notifications
You must be signed in to change notification settings - Fork 837
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
Update vector space utility functions for all spaces #223
Update vector space utility functions for all spaces #223
Conversation
I'm slightly confused by this, as I understand this is just refactoring of existing code, except it's put into the experimental directory, so it kinda looks like new code in the diff? Wouldn't it be better to just change it in the live version of the repo, and then it will get merged with the experimental stuff when that becomes stable? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this implementation, the functions are in a single file where before the functions were in two functions (numpy_utils.py and spaces.py)
Im happy to add the changes to root vector
# Conflicts: # gymnasium/vector/utils/numpy_utils.py
# Conflicts: # gymnasium/experimental/vector/__init__.py
# Conflicts: # gymnasium/experimental/vector/utils/__init__.py # gymnasium/experimental/vector/utils/space_utils.py # tests/experimental/vector/__init__.py # tests/experimental/vector/utils/__init__.py # tests/experimental/vector/utils/test_space_utils.py
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
# Conflicts: # tests/spaces/utils.py
I am improving some of the wrappers and I found that we can use several of the built-in vector functions for generating empty arrays, stacking observations, etc
In this PR, I have copied the original space utility functions from vector which were in two files,
spaces
andnumpy_utils
into a single file,space_utils
, the functions arebatch_space
,concatenate
,iterate
andcreate_empty_array
I have not changed the implementation of the functions other than adding new functions for the
Sequence
,Text
,Graph
spacesFor testing, I have not included expected outputs for each of the functions. This can be added, rather I have opted for functionality testing of the functions, in particular the interface between the four functions