-
Notifications
You must be signed in to change notification settings - Fork 322
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
Does Ax allow attachment of trials where trails have input values outside the experiment's parameter bounds? #3269
Comments
Yes, we definitely want to support this. #3040 is relevant, which separates concepts of "modeling space" and "search space". From that PR:
So we do support this internally, but it appears the higher level API has some (potentially unnecessary; could warn instead) validation step. Could you share the full stack trace of the error? I'm having a bit of a hard time manually tracking down how this error is actually raised from your code entry point. |
Hi Max, Very glad to see I am not going crazy. I have put together this Google colab for you which you can clone and play with, follow traces etc. : The following lines will run:
While these lines will not, due to the search_space validator, because "2.0" is outside the bounds of [0.0,1.0]:
We'd like to get this sorted ASAP, shall I continue where @bletham has left off (had a quick look, so not sure how far he got), make changes and submit a merge-request? Or should we aim for some more coordination? Thanks a lot in advance! |
This addressed the internals of this on the modeling side; we essentially just need to change the user-facing API here. We're working on a new, consolidated API (preview here: https://github.com/facebook/Ax/blob/main/ax/preview/api/client.py) and the right thing to do would be to ensure things are handled properly there - cc @mpolson64 It'll be a bit until this is fully released, so one could consider updating the existing API to allow for this. Let me discuss this with some folks this week. |
Thanks for the update and context, we'll attempt a quick fix on the current API, and looking forward to what you conclude with your folks. :) |
We are starting on fixing the current API this week, any news from your side? @Balandat |
@mpolson64 was going to look into this |
Hi @jakobzeitler! This is currently high priority in our backlog, but we unfortunately cannot attend to this immediately. |
Hi! I've implemented changes to expose the |
Hi @josephinecowley thanks for putting this together! This seems like a fairly safe change an should be alright for us to land, but let me see what I can do to get this larger solution @Balandat @lena-kashtelyan and I have been thinking about prioritized and implemented, ideally within the week. If it looks like it is going to get delayed longer than that we can make sure to get #3402 or something to its effect in instead. |
Summary: As mentioned in facebook#3269 We've discovered that attaching an out of design custom arm is a fairly common desire in Ax experiments, typically because a user has existing data from outside of the search space which may be useful for the surrogate model to know about. This diff makes it so out of design points added via Experiment.attach_trial will continue to be validates, but out of design will now WARN instead of raising an error. We also add functionality to prevent out of design points from being selected in a previous diff. Differential Revision: D70920706
Summary: Prereq for solving facebook#3269 This situation may arise when a user attaches a custom arm (say a baseline or data from a previous experiment) which is intentionally out of design. If a user specifies they are only interested in searching over a specific space we should not return points outside of that space when they request the best trial or pareto frontier. Differential Revision: D70920707
Summary: Pull Request resolved: facebook#3493 As mentioned in facebook#3269 We've discovered that attaching an out of design custom arm is a fairly common desire in Ax experiments, typically because a user has existing data from outside of the search space which may be useful for the surrogate model to know about. This diff makes it so out of design points added via Experiment.attach_trial will continue to be validates, but out of design will now WARN instead of raising an error. We also add functionality to prevent out of design points from being selected in a previous diff. Differential Revision: D70920706
Summary: Prereq for solving facebook#3269 This situation may arise when a user attaches a custom arm (say a baseline or data from a previous experiment) which is intentionally out of design. If a user specifies they are only interested in searching over a specific space we should not return points outside of that space when they request the best trial or pareto frontier. Differential Revision: D70920707
A possible Ax data loading routine might look like this:
If the bounds set for the experiment in the Ax client are tighter than sample values in the some of the trials loaded via the routine above, an error will be raised by this validation step in search_space.py
Is this intended behaviour?
I fearing I might be abusing Ax API here, but at least theoretically, we should able to sample from posteriors generated from models with data where constraints are tighter than samples used to train the surrogate.
Thanks a lot in advance!
The text was updated successfully, but these errors were encountered: