-
Notifications
You must be signed in to change notification settings - Fork 313
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
Deterministic sampling with Gym environments #2180
Comments
Hi, thank you for trying garage. It seems that Gym don't have a method that can set seed for all environments. Instead, you can call |
Thanks for your answer. So these are already two new seeds users have to be aware of in order to make their experiments reproducible. Furthermore, there might be similar issues with other environment libraries such as |
Thank you for your informative reply. Reproducibility is our core promise. We will address this issue. |
Cool, would be happy to contribute and make a PR. |
Great! You can follow this git workflow to make a PR. |
Hi Adrian, Thank you for offering to fix this. To get you started on where to look, I believe the best place to make this change is in The alternative way of implementing this would be to extend the environment API to include a Unfortunately ensuring determinism when evaluating policies in off-policy algorithms is somewhat more complicated because there isn't a clear place to do it right now. That evaluation always gathers samples using this function, but there's no guarantee that the algorithm calls |
I would endorse extending the |
Thanks for your input. Both implementation proposals make sense to me. Though I find extending the |
Just open a WiP-PR. We could also move discussions there if you feel its more convenient. |
Hi @ryanjulian and @krzentner, |
I left a couple comments on the PR, otherwise this looks good to me! |
Hello everybody,
when I used Garage's
EpsilonGreedyStrategy
and Gym environments I found that sampling is not deterministic. I've set the seed viadeterministic.set_seed(seed)
.After some investigation I found that Garage doesn't set any seeds for Gym. Is there any reason for that? As a user I would actually expect that Garage handles all that for me.
Happy to do a PR in case you feel like this should be added!
The text was updated successfully, but these errors were encountered: