-
Notifications
You must be signed in to change notification settings - Fork 724
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
Dict space support for VecEnv #207
Conversation
Hello, |
Thanks @araffin. I think the only things I missed were updating the change log (done now) and creating an accompanying issue for the PR (closes #208). Let me know if there are any changes you'd like to see. There's also a case for adding |
Yes for the changelog, but I was more concern about the import and the documentation of each function (and the doc style). |
Thanks for the comments. Re: the imports, I assume the issue is with the relative import style. This was already present in I've expanded on the documentation for the functions added and made them a consistent style. Happy to elaborate on this more but the functions added in the PR are all module-private so documentation doesn't seem as important as if part of public API. |
I should have been more explicit, relative import are fine, i was refering to the |
I've added support for Tuple observations, ready for review. One area I'd appreciate feedback is what axis ordering we want for actions. Note there are two axes in the observations/actions for For observations, the first axis indexes into the However, I'm less sure what the right choice is for actions. Right now, Converting between these two conventions is just a transpose operation, so the user can always change it, but it'd be good to get the default right. |
Hello, I did a quick test today and found a minor inconsistency:
It also seems that the doc needs to be updated (+ adding a note saying that currently no model supports those spaces). I'll try to have a deeper look in the coming days but I'm quite busy right now... PS: please add your name at the bottom of the changelog too ;) |
Thanks for the review and catching the error with What docs would you like me to update? I believe the |
I would say this one.
yes, that what I meant for updating the doc. Please add a note about what is supported by the vec env. |
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.
Some minor changes required.
For your question about the order (key of the dict first or env idx first), I need to think a bit more about that.
Thanks for your comments. I've added documentation on supported spaces to the vector environment page, and also clarified on the RL algorithms page that the algorithms do not currently support |
Thank you very much for your good PR. |
I've made the suggested improvements to the documentation, thanks for the feedback. |
OpenAI added support for Dict observation spaces to DummyVecEnv and SubprocVecEnv after the fork. This PR cherry-picks these changes, while retaining the improvements made by Stable Baselines. This will be needed (amongst other changes) to support use cases such as #133.
OpenAI also added ShmemVecEnv, with common code factored out into util.py. I've retained the util.py as a separate file in case we wish to also port over ShmemVecEnv in the future.