fix: Numerical tolerance for filtering of X_avoid#3301
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3301 +/- ##
=======================================
Coverage 99.98% 99.98%
=======================================
Files 225 225
Lines 22289 22289
=======================================
Hits 22285 22285
Misses 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @atinary-lbrey. Do you have examples of cases where the exact equality checks cause issues? It is a bit surprising that exact equality checks against candidates (presumably) produced by the discrete optimizer would fail. Do you provide Overall, this seems like a reasonable solution at first but I have my concerns. These broadly apply to any discrete optimizer.
|
Motivation
Realized there was some numerical instabilities with hard equality check when filtering X_avoid points from choices in
optimize_discrete*Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Added a test case in the TestOptimizeDiscrete by adding noise up to hard tolerance (
1e-8) and checking that the behavior was the same as in the exact case.Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/meta-pytorch/botorch, and link to your PR here.)