-
Notifications
You must be signed in to change notification settings - Fork 311
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
Is there a way to set a random seed for the Ax Service API. #151
Comments
@aagarwal1999, yep, there is –– you will need to make a custom generation strategy. You can get one by resetting it right after your experiment:
You can import Ax/ax/service/utils/dispatch.py Line 18 in 7d34dd3
Then, you will need to set the torch seed before each call to Let me know if that fully solves the issue. |
I am getting an error stating:
I suspect this is due to the fact that I am not using the latest version of Ax. However, when I updated to the latest version, I was getting an import error when I try and import AxClient
|
@aagarwal1999, you're right that the argument was unexpected because you had a later version; the BoTorch defaults import error, however, is news to me. Did you try to update BoTorch also? |
That fixed it! Thanks |
@aagarwal1999, also, I didn't know this when I responded to your question, but setting the random seed this say in the long run is non-ideal as it sets the seed for torch globally, which may impact model performance. I will have a fix for this on master by tomorrow –– will add a |
Hi, has the fix been implemented for the AxClient seed? |
Hi, Ankit! Not yet, but a partial fix will be on master soon (possibly today; I will update this issue like I said I would). Partial, because there isn't a way to fully make the Bayesian optimization part of the process reproducible (that is safe; I learned that setting the Now, the partial fix will provide a random seed setting to AxClient, which will make the initial quasi-random trials fully reproducible and the subsequent trials somewhat reproducible (but as you generate more trials, they will start differing more and more). Finally, if you want reproducibility because you want your Ax optimization to use data from previous optimization, you can attach those trials via Let me know if that helps / makes sense! |
Summary: Provide an ability to fix random seed for reproducibility, people have been asking for this in open-source (e.g. #151) Reviewed By: ldworkin Differential Revision: D16813373 fbshipit-source-id: 020f8f1d30820551e0fcc8c0d0178e5f46420c7b
Closing this issue because the |
I have a use case in which users want to be able to view the trials they are going to run before they run them and I would like to show the exact values of the trials that are going to be run. Is there a way to set a random seed for the service API for reproducibility.
The text was updated successfully, but these errors were encountered: