Skip to content

Commit

Permalink
Allow for linear kernel for ARD in Python GP.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 589667878
  • Loading branch information
qiuyiz authored and Copybara-Service committed Dec 11, 2023
1 parent 097adc7 commit 3b92a21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vizier/_src/algorithms/designers/gp_bandit.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,10 @@ def from_problem(
cls, problem: vz.ProblemStatement, seed: Optional[int] = None
) -> 'VizierGPBandit':
rng = jax.random.PRNGKey(seed or 0)
# Linear coef is set to 1.0 as prior and uses VizierLinearGaussianProcess
# which uses a sum of Matern and linear but ARD still tunes its amplitude.
if problem.is_single_objective:
return cls(problem, rng=rng)
return cls(problem, rng=rng, linear_coef=1.0)
else:
num_objectives = len(
problem.metric_information.of_type(vz.MetricType.OBJECTIVE)
Expand All @@ -600,6 +602,7 @@ def _scalarized_ucb(
)
return cls(
problem,
linear_coef=1.0,
scoring_function_factory=scoring_fn_factory,
scoring_function_is_parallel=True,
use_trust_region=False,
Expand Down

0 comments on commit 3b92a21

Please sign in to comment.