Skip to content

Using the equality_constraints argument in the optimize_acqf function #1899

Closed Answered by DavidSiretMarques
DavidSiretMarques asked this question in Q&A
Discussion options

You must be logged in to vote

After a lot of searching, and a bunch of hours lost tracking code, I've found out that the optimize_acqf makes a call, under the hood, to gen_candidates_scipy which, in turn, when equality_constraints is given, calls the function make_scipy_linear_constraints.

In the docstring of that function (or the docs, it doesn't really matter) we can see a good example of how to use the equality_constraints argument:

Example:

The following will enforce that x[1] + 0.5 x[3] >= -0.1 for each x
in both elements of the q-batch, and each of the 3 t-batches:

    >>> constraints = make_scipy_linear_constraints(
    >>>     torch.Size([3, 2, 4]),
    >>>     [(torch.tensor([1, 3]), torch.tensor([1.0, 0.5])…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Balandat
Comment options

@Balandat
Comment options

Answer selected by DavidSiretMarques
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants