8000 Trial and metric padding is not yet supported for multimetric problems in GP-UCB-PE. by copybara-service[bot] · Pull Request #1225 · google/vizier · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Trial and metric padding is not yet supported for multimetric problems in GP-UCB-PE. #1225

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

Merged
merged 1 commit into from
Jan 17, 2025
Merged
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
26 changes: 18 additions & 8 deletions vizier/_src/algorithms/designers/gp_ucb_pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,14 +655,24 @@ def __attrs_post_init__(self):
# Extra validations
if self._problem.search_space.is_conditional:
raise ValueError(f'{type(self)} does not support conditional search.')
elif (
len(self._problem.metric_information) != 1
and self._config.optimize_set_acquisition_for_exploration
):
raise ValueError(
f'{type(self)} works with exactly one metric when'
' `optimize_set_acquisition_for_exploration` is enabled.'
)
elif len(self._problem.metric_information) != 1:
if self._config.optimize_set_acquisition_for_exploration:
raise ValueError(
f'{type(self)} works with exactly one metric when'
' `optimize_set_acquisition_for_exploration` is enabled.'
)
empty_labels = jnp.array([[]])
padded_labels = self._padding_schedule.pad_labels(empty_labels)
if padded_labels.shape[0] != empty_labels.shape[0]:
raise ValueError(
f'{type(self)} does not support trial padding for multimetric'
' problems.'
)
if padded_labels.shape[1] != empty_labels.shape[1]:
raise ValueError(
f'{type(self)} does not support metric padding for multimetric'
' problems.'
)

# Extra initializations.
# Discrete parameters are continuified to account for their actual values.
Expand Down
5 changes: 0 additions & 5 deletions vizier/_src/algorithms/designers/gp_ucb_pe_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class GpUcbPeTest(parameterized.TestCase):
iters=3,
batch_size=3,
num_metrics=2,
applies_padding=True,
multimetric_promising_region_penalty_type=(
gp_ucb_pe.MultimetricPromisingRegionPenaltyType.UNION
),
Expand All @@ -99,7 +98,6 @@ class GpUcbPeTest(parameterized.TestCase):
iters=3,
batch_size=3,
num_metrics=2,
applies_padding=True,
ensemble_size=4,
multimetric_promising_region_penalty_type=(
gp_ucb_pe.MultimetricPromisingRegionPenaltyType.INTERSECTION
Expand All @@ -111,23 +109,20 @@ class GpUcbPeTest(parameterized.TestCase):
num_seed_trials=5,
num_metrics=2,
multitask_type=mt_type.SEPARABLE_NORMAL_TASK_KERNEL_PRIOR,
applies_padding=True,
),
dict(
iters=3,
batch_size=5,
num_seed_trials=5,
num_metrics=2,
multitask_type=mt_type.SEPARABLE_LKJ_TASK_KERNEL_PRIOR,
applies_padding=True,
),
dict(
iters=3,
batch_size=5,
num_seed_trials=5,
num_metrics=2,
multitask_type=mt_type.SEPARABLE_DIAG_TASK_KERNEL_PRIOR,
applies_padding=True,
),
)
def test_on_flat_space(
Expand Down
Loading
0