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 get_default_partitioning_alpha for >7 objectives #2646

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion botorch/acquisition/multi_objective/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_default_partitioning_alpha(num_objectives: int) -> float:
BotorchWarning,
stacklevel=3,
)
return 10 ** (-8 + num_objectives)
return 10 ** (-2 if num_objectives >= 6 else -3)


def prune_inferior_points_multi_objective(
Expand Down
6 changes: 3 additions & 3 deletions test/acquisition/multi_objective/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@

class TestUtils(BotorchTestCase):
def test_get_default_partitioning_alpha(self):
for m in range(2, 7):
expected_val = 0.0 if m < 5 else 10 ** (-8 + m)
for m in range(2, 9):
expected_val = 0.0 if m < 5 else 10 ** (-2 if m >= 6 else -3)
self.assertEqual(
expected_val, get_default_partitioning_alpha(num_objectives=m)
)
# In `BotorchTestCase.setUp` warnings are filtered, so here we
# remove the filter to ensure a warning is issued as expected.
warnings.resetwarnings()
with warnings.catch_warnings(record=True) as ws:
self.assertEqual(0.1, get_default_partitioning_alpha(num_objectives=7))
self.assertEqual(0.01, get_default_partitioning_alpha(num_objectives=7))
self.assertEqual(len(ws), 1)


Expand Down
Loading