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

Fix SCBO tutorial #2034

Closed

Conversation

dme65
Copy link
Contributor

@dme65 dme65 commented Oct 4, 2023

This fixes several constraint handling bugs in the SCBO tutorial as reported in #2031, #2032, and #2033. In addition, it also fixes a bug and cleans up some of the logic in ConstrainedMaxPosteriorSampling.

The previous problem was too easy, so we never actually tested some of the aspects of the constraint handling. I switched to the same version of the Ackley problem as considered in https://arxiv.org/pdf/2002.08526.pdf and I'm observing comparable performance.

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

codecov bot commented Oct 4, 2023

Codecov Report

Merging #2034 (0d4c328) into main (dcb2ba4) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 0d4c328 differs from pull request most recent head b646c0f. Consider uploading reports for the commit b646c0f to get more accurate results

@@            Coverage Diff            @@
##              main     #2034   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          179       179           
  Lines        15891     15889    -2     
=========================================
- Hits         15891     15889    -2     
Files Coverage Δ
botorch/generation/sampling.py 100.00% <100.00%> (ø)

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

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 pending the test TODO

@facebook-github-bot
Copy link
Contributor

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

@@ -254,82 +252,101 @@ def __init__(
objective: Optional[MCAcquisitionObjective] = None,
posterior_transform: Optional[PosteriorTransform] = None,
replacement: bool = True,
minimize_constraints_only: bool = False,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we deprecate this arg so this doesn't cause hard failures in other code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this should be ok since this functionality probably has no users (that would have likely resulted in Github issues since it wasn't working as intended).

botorch/generation/sampling.py Outdated Show resolved Hide resolved
botorch/generation/sampling.py Outdated Show resolved Hide resolved
botorch/generation/sampling.py Outdated Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@dme65 merged this pull request in 5e3677f.

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. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants