Skip to content

Commit

Permalink
Improve seq greedy arror handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Scienfitz committed Apr 26, 2024
1 parent b5fd1ec commit a75b012
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions baybe/recommenders/pure/bayesian/sequential_greedy.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ def _recommend_discrete(
self._botorch_acqf, batch_size, candidates_tensor
)
except AttributeError as ex:
raise NoMCAcquisitionFunctionError(
f"The '{self.__class__.__name__}' only works with Monte Carlo "
f"acquisition functions for batch sizes > 1."
) from ex
if batch_size > 1 and not self.acquisition_function.is_mc:
raise NoMCAcquisitionFunctionError(
f"The '{self.__class__.__name__}' only works with Monte Carlo "
f"acquisition functions for batch sizes > 1."
) from ex
raise ex

# retrieve the index of the points from the input dataframe
# IMPROVE: The merging procedure is conceptually similar to what
Expand Down

0 comments on commit a75b012

Please sign in to comment.