poli.objective_repository.penalized_logp_lambo.register.PenalizedLogPLamboBlackBox#
- class poli.objective_repository.penalized_logp_lambo.register.PenalizedLogPLamboBlackBox(string_representation: Literal['SMILES', 'SELFIES'] = 'SMILES', penalized: bool = True, batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, force_isolation: bool = False)#
A black box objective function that returns the penalized logP of a molecule, using the same function that LaMBO [1] uses.
In particular, they adjust the penalized logP using some “magic numbers”, which are the empirical means and standard deviations of the dataset.
- __init__(string_representation: Literal['SMILES', 'SELFIES'] = 'SMILES', penalized: bool = True, batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, force_isolation: bool = False)#
Initialize the AbstractBlackBox object.
- Parameters
batch_size (int, optional) – The batch size for parallel execution, by default None.
parallelize (bool, optional) – Flag indicating whether to parallelize the execution, by default False.
num_workers (int, optional) – The number of workers for parallel execution, by default we use half the available CPUs.
evaluation_budget (int, optional) – The maximum number of evaluations allowed for the black box function, by default float(“inf”).
Methods
__init__
([string_representation, penalized, ...])Initialize the AbstractBlackBox object.
reset_evaluation_budget
()Resets the evaluation budget by setting the number of evaluations made to 0.
set_observer
(observer)Set the observer object for recording observations during evaluation.
terminate
()Terminate the black box optimization problem.