-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Data type for Spaces #527
Comments
There is a In practice, all my agents end up converting bytes to floats before using them in tensorflow, at least because I want to multiply by But it seems reasonable to have pixel-based envs set the dtype to |
A proper serialization format would be nice for all gym.spaces |
@hholst80 Pickle should work for all spaces and points in the space. |
@tlbtlbtlb But Pickle could be a good solution. Too bad its hard to use between C# and Python. If we could serialize it to a dict we could easily use json to serialize it over network / between applications. |
To interchange data with other languages, consider the gym-http-api package. It has a JSON representation of spaces, as well as everything else. |
I think the various spaces objects should have a dtype property that specifies the correct type. This will make creating tensorflow placeholders and database-like structures that are memory efficient.
For example a
Box(low=0, high=255, shape(255, 255, 3))
could haveBox(low=0, high=255, shape(255, 255, 3), dtype=np.uint8)
. This would allow someone to useenv.observation_space.dtype
in a meaningful way.The text was updated successfully, but these errors were encountered: