Skip to content
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

add eta to get_acquisition_function #1541

Closed
wants to merge 3 commits into from

Conversation

jduerholt
Copy link
Contributor

Motivation

This PR adds the eta parameter for the constraints also to get_acquisition_function.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

Unit tests.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 6, 2022
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #1541 (c694a27) into main (08897cd) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #1541   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          153       153           
  Lines        13598     13598           
=========================================
  Hits         13598     13598           
Impacted Files Coverage Δ
botorch/acquisition/utils.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jduerholt
Copy link
Contributor Author

I also fixed in this PR the linting issue from main.

@@ -61,8 +62,13 @@ def get_acquisition_function(
constraints: A list of callables, each mapping a Tensor of dimension
`sample_shape x batch-shape x q x m` to a Tensor of dimension
`sample_shape x batch-shape x q`, where negative values imply
feasibility. Used when constraint_transforms are not passed
as part of the objective.
feasibility. Used only for qEHVI and qNEHVI.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sdaulton, @saitcakmak I guess this special handling is needed b/c we don't yet have posterior transforms implemented for MOO? Do we have any concrete plans to change this? It would be nice to make this interface more consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I thought the reason is that in qNEHVI and qEHVI the constraints are defined directly in the acquisition function whereas in the other acqfs, we define the constraints as part of the objective and then give the objective to the constructor of the acquisition function. Or is there another reason?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @jduerholt is correct here. IIRC, in q(N)EHVI we use constraints to weight the HVI, whereas in other acqfs, we feasibility weight the samples directly (via the objective).

Copy link
Contributor

@Balandat Balandat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants