Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Enabling candidate generation with both
non_linear_constraints
andfixed_features
#1912Enabling candidate generation with both
non_linear_constraints
andfixed_features
#1912Changes from 9 commits
8026af1
f86c27e
3cf28b1
a4445be
f30d81e
82bcab1
e4346ce
2593b81
d550f15
fa4d4cb
2047e40
fe9eb1a
2e177c9
9d3f189
cbe0d2b
0e71cdb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Two subjective suggestions to make this quicker to parse:
_gen_nonlin_constraints_of_variable_features
? Could apply same convention to the linear case below. (cc @Balandat)fixed_features
, returns a list of non-linear constraints on the variable (non-fixed) features."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.
I added a docsting. Concerning renaming: should I do it, or should it be done in a seperate PR for both methods (nonlinear and linear) to keep it consistent?
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.
Thank you! If you're up for it, you can do both in this commit. The only mentions of
_generate_unfixed_lin_constraints
are in:generation/utils.py
,optim/parameter_constraints.py
, andtest/optim/parameter_constraints.py
.A quick search and replace in these files should do it.
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.
Hmm, but do you really prefer the new name? What do you do not like about
_generate_unfixed_lin_constraints
?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.
But ofc, I can do it ;)
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.
_generate_unfixed_(non)lin_constraints
makes it sound like the constraints are "unfixed", whereas it is the features that are. But let's keep it then, especially since the docstring makes it clear now. Thanks for adding it!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.
Hmm so with this setup this test may pass even if fixing the features doesn't work (given that it only narrows this to a specific solution of the previous solution set). Can you use a different value here? I might also make sense to use a different mock acquisition function so that the optimizer is unique...
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.
I will have a deeper look to the test. All this mocking is sometimes a bit hard for me to understand ;)
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.
I don't think there is actually any mocking going on here - it's just that
mock_acq_function
is aSquaredAcquisitionFunction
rather than a true acquisition function.If you don't want to change that, one thing you could do would be to just replace one of the constraints to result in a different optimum / optimizer.