"""Utilities for acquisition functions."""frombaybe.acquisition.baseimportAcquisitionFunction
[docs]defstr_to_acqf(name:str,/)->AcquisitionFunction:"""Create an ACQF object from a given ACQF name."""returnAcquisitionFunction.from_dict({"type":name})
[docs]defconvert_acqf(acqf:AcquisitionFunction|str,/)->AcquisitionFunction:"""Convert an ACQF name into an ACQF object (with ACQF object passthrough)."""returnacqfifisinstance(acqf,AcquisitionFunction)elsestr_to_acqf(acqf)