Skip to content

Conversation

@AVHopp
Copy link
Contributor

@AVHopp AVHopp commented Sep 5, 2025

Motivation

This PR improves the documentation and error handling when attempting to use inter-point constraints within optimize_acqf_mixed which is not supported. It implements the solution to #2996 discussed in this issue.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

I verified my code by ensuring that the example posted in #2996 raises an error message. I did not add any tests, but would be happy to turn that example into a dedicated test if being pointed to the correct place for doing so.

EDIT: A minimal test has been added in 92140e9

Related PRs

None.

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 5, 2025
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.

Thanks for adding this!

I did not add any tests, but would be happy to turn that example into a dedicated test if being pointed to the correct place for doing so.

It would be great if you could add a lightweight test_error_on_interpoint_constraints() test to TestOptimizeAcqfMixed here https://github.com/pytorch/botorch/blob/main/test/optim/test_optimize.py#L1765 to validate that the error gets raised when passing in inter-point constraints.

AVHopp and others added 3 commits September 5, 2025 15:55
Co-authored-by: Max Balandat <Balandat@users.noreply.github.com>
Co-authored-by: Max Balandat <Balandat@users.noreply.github.com>
@AVHopp
Copy link
Contributor Author

AVHopp commented Sep 5, 2025

@Balandat I've applied your suggestions and added a small test here: 92140e9

@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this in D81792795.

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.

Excellent, thank you!

@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7258017) to head (c6e00f1).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #3003   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          216       216           
  Lines        20392     20401    +9     
=========================================
+ Hits         20392     20401    +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this in D81792795.

@facebook-github-bot
Copy link
Contributor

@Balandat merged this pull request in 1518b30.

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.

4 participants