baybe.acquisition.debotorchize

baybe.acquisition.debotorchize(acqf_cls: type[AcquisitionFunction])[source]

Wrap a given BoTorch acquisition function.

This wrapped function becomes generally usable in combination with other non-BoTorch surrogate models. This is required since BoTorch’s acquisition functions expect a botorch.model.Model to work with, hindering their general use with arbitrary probabilistic models. The wrapper class returned by this function resolves this issue by operating as an adapter that internally creates a helper BoTorch model, which serves as a translation layer and is passed to the selected BoTorch acquisition function, carrying the posterior information provided from any other probabilistic model implementing BayBE’s Surrogate interface.

Parameters:

acqf_cls (type[AcquisitionFunction]) – An arbitrary BoTorch acquisition function class.

Returns:

A wrapped version of the class that accepts non-BoTorch surrogate models.