Skip to content

Commit

Permalink
Passes prior features to set-acquisition optimization
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 634399230
  • Loading branch information
vizier-team authored and Copybara-Service committed May 16, 2024
1 parent 6da65e5 commit e1f2347
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vizier/_src/algorithms/designers/gp_ucb_pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,15 +826,12 @@ def _suggest_one(

if isinstance(acquisition_optimizer, vb.VectorizedOptimizer):
acq_rng, self._rng = jax.random.split(self._rng)
prior_features = None
if self._all_completed_trials:
prior_features = vb.trials_to_sorted_array(
self._all_completed_trials, self._converter
)
with profiler.timeit('acquisition_optimizer', also_log=True):
best_candidates = eqx.filter_jit(acquisition_optimizer)(
scoring_fn.score,
prior_features=prior_features,
prior_features=vb.trials_to_sorted_array(
self._all_completed_trials, self._converter
),
count=1,
seed=acq_rng,
score_with_aux_fn=scoring_fn.score_with_aux,
Expand Down Expand Up @@ -930,6 +927,9 @@ def _suggest_batch_with_exploration(
with profiler.timeit('acquisition_optimizer', also_log=True):
best_candidates = eqx.filter_jit(acquisition_optimizer)(
scoring_fn.score,
prior_features=vb.trials_to_sorted_array(
self._all_completed_trials, self._converter
),
count=1,
seed=acq_rng,
score_with_aux_fn=scoring_fn.score_with_aux,
Expand Down

0 comments on commit e1f2347

Please sign in to comment.