-
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
Fixed batch spaces where the original space's seed was ignored. Issue 2680 #2727
Conversation
…pr__ for the dictionary space string looks similar to an actual dictionary
…ify nvec typing to include np.ndarray
…g.RNG is provided then it is assigned to _np_random and .seed is not run
…equivalent for testing
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.
Interesting stuff @pseudo-rnd-thoughts !
I left some comments here, hopefully they are useful to you.
I'm not a "real" contributor to Gym, so I'm not approving this PR or anything, just commenting.
Have a good one!
…s not a complete copy of the original space
…e original space doesn't sampling doesn't effect the batched_space
…t_each_index and test_deterministic
@lebrice I think I have made all of the changes that you requested, could you review again please? |
@pseudo-rnd-thoughts can you please fix tests? |
merge conflicts* |
@jkterry1 I have fixed the merge conflicts and passed all of the tests. However, running the tests locally (on mac) then I'm getting an error with Edit - The solution was much simpler than I thought and is solved in the commit below |
…rocess_write function was unpicklable. Making the function a top-level function solves this error
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.
Thanks for the changes @pseudo-rnd-thoughts !
… the number of batched spaces n=1
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.
Added a bunch of comments. Overall this breaks my brain a little bit, but I think the angle of the solution is fine, so I left some nitpicks for the implementation.
And for the ease of clicking for future me: #2680
Ah, and please name the PR in some more descriptive way. |
Hey @pseudo-rnd-thoughts just a small remark: Also, and this is perhaps a bit "extra", but I personally like to leave a comment with the hash of the commit that addresses the feedback, something like "fixed in abcdef123", and GitHub will automatically create a link to view the diff for that commit. This makes the reviewing experience much better. Also, could you please un-resolve the discussions where I left a comment? I don't believe I can do it myself atm. |
Thanks, this is my first time working on a project of this size so thanks for the recommendations, I will try to do all of them. |
…` with `from numpy.testing import assert_array_equal`
….state` with `np_random`
@lebrice I think that you have made all of the changes necessary. |
@lebrice Sorry I messed up, I have responded to all of your messages but had them as a review and pending and thought they had gone through but they hadn't. Just did that now, I hope my "old" answers are helpful |
Looks good now |
Provides a fix for issue 2680 where the SyncVectorEnv ignores the action space seed
This required changes to the batch_space function for each of the spaces to pass the seed for the batched space
The space constructor seed parameter allows a seeding.RandomNumberGenerator that ignores the seed function if passed