From 49c25e5c588d0e2482b97ee59d90f757bf4cf67d Mon Sep 17 00:00:00 2001 From: Ryan Roussel Date: Tue, 7 Jan 2025 09:54:06 -0600 Subject: [PATCH] remove ucb log validator --- xopt/generators/bayesian/upper_confidence_bound.py | 13 +++---------- xopt/tests/generators/bayesian/test_mobo.py | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/xopt/generators/bayesian/upper_confidence_bound.py b/xopt/generators/bayesian/upper_confidence_bound.py index 01e47860..7a33ef57 100644 --- a/xopt/generators/bayesian/upper_confidence_bound.py +++ b/xopt/generators/bayesian/upper_confidence_bound.py @@ -34,19 +34,12 @@ class UpperConfidenceBoundGenerator(BayesianGenerator): def validate_vocs_without_constraints(cls, v): if v.constraints: warnings.warn( - f"Using {cls.__name__} with constraints may lead to numerical issues if the base acquisition " - f"function has negative values." + f"Using {cls.__name__} with constraints will lead to invalid values " + f"if the base acquisition function has negative values. Use with " + f"caution." ) return v - @field_validator("log_transform_acquisition_function") - def validate_log_transform_acquisition_function(cls, v): - if v: - raise ValueError( - "Log transform cannot be applied to potentially negative UCB " - "acquisition function." - ) - def _get_acquisition(self, model): objective = self._get_objective() if self.n_candidates > 1 or isinstance(objective, CustomXoptObjective): diff --git a/xopt/tests/generators/bayesian/test_mobo.py b/xopt/tests/generators/bayesian/test_mobo.py index a943ce31..c6fece54 100644 --- a/xopt/tests/generators/bayesian/test_mobo.py +++ b/xopt/tests/generators/bayesian/test_mobo.py @@ -236,7 +236,6 @@ def test_log_mobo(self): gen = MOBOGenerator( vocs=tnk_vocs, reference_point=reference_point, - log_transform_acquisition_function=True, ) gen = deepcopy(gen) gen.n_monte_carlo_samples = 20