poli.objective_repository.sa_tdc.register.SABlackBox

poli.objective_repository.sa_tdc.register.SABlackBox#

class poli.objective_repository.sa_tdc.register.SABlackBox(string_representation: Literal['SMILES', 'SELFIES'] = 'SMILES', batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, force_isolation: bool = False)#

Synthetic-accessibility black box implementation using the TDC oracles [1].

Parameters
  • string_representation (Literal["SMILES", "SELFIES"], optional) – A string (either “SMILES” or “SELFIES”) specifying which molecule representation you plan to use.

  • batch_size (int, optional) – The batch size for simultaneous execution, by default None.

  • parallelize (bool, optional) – Flag indicating whether to parallelize execution, by default False.

  • num_workers (int, optional) – The number of workers for parallel execution, by default None.

  • evaluation_budget (int, optional) – The maximum number of function evaluations. Default is infinity.

__init__(string_representation: Literal['SMILES', 'SELFIES'] = 'SMILES', batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, force_isolation: bool = False)#

Initialize the SABlackBox object.

Parameters
  • string_representation (Literal["SMILES", "SELFIES"], optional) – A string (either “SMILES” or “SELFIES”) specifying which molecule representation you plan to use.

  • batch_size (int, optional) – The batch size for parallel evaluation, by default None.

  • parallelize (bool, optional) – Flag indicating whether to parallelize the evaluation, by default False.

  • num_workers (int, optional) – The number of workers for parallel evaluation, by default None.

  • evaluation_budget (int, optional) – The maximum number of evaluations, by default float(“inf”).

Methods

__init__([string_representation, ...])

Initialize the SABlackBox 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.