diff --git a/src/poli/benchmarks/guacamol.py b/src/poli/benchmarks/guacamol.py index 0dd45f03..9cf85b8a 100644 --- a/src/poli/benchmarks/guacamol.py +++ b/src/poli/benchmarks/guacamol.py @@ -85,7 +85,7 @@ def __init__( batch_size: Union[int, None] = None, parallelize: bool = False, num_workers: Union[int, None] = None, - evaluation_budget: int = float("inf"), + evaluation_budget: Union[int, None] = None, ) -> None: super().__init__( seed=seed, diff --git a/src/poli/benchmarks/pmo.py b/src/poli/benchmarks/pmo.py index 6652141a..a004b1fc 100644 --- a/src/poli/benchmarks/pmo.py +++ b/src/poli/benchmarks/pmo.py @@ -75,7 +75,7 @@ def __init__( batch_size: Union[int, None] = None, parallelize: bool = False, num_workers: Union[int, None] = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ) -> None: super().__init__( string_representation=string_representation, diff --git a/src/poli/benchmarks/toy_continuous_functions_benchmark.py b/src/poli/benchmarks/toy_continuous_functions_benchmark.py index 6cf2fd78..efe1d426 100644 --- a/src/poli/benchmarks/toy_continuous_functions_benchmark.py +++ b/src/poli/benchmarks/toy_continuous_functions_benchmark.py @@ -54,7 +54,7 @@ def __init__( batch_size: Union[int, None] = None, parallelize: bool = False, num_workers: Union[int, None] = None, - evaluation_budget: Union[int, List[int]] = float("inf"), + evaluation_budget: Union[int, List[int]] = None, ) -> None: super().__init__( seed=seed, @@ -121,7 +121,7 @@ def __init__( batch_size: Union[int, None] = None, parallelize: bool = False, num_workers: Union[int, None] = None, - evaluation_budget: Union[int, List[int]] = float("inf"), + evaluation_budget: Union[int, List[int]] = None, ) -> None: super().__init__( seed, @@ -174,7 +174,7 @@ def __init__( batch_size: Union[int, None] = None, parallelize: bool = False, num_workers: Union[int, None] = None, - evaluation_budget: Union[int, List[int]] = float("inf"), + evaluation_budget: Union[int, List[int]] = None, ) -> None: super().__init__( seed, diff --git a/src/poli/core/abstract_benchmark.py b/src/poli/core/abstract_benchmark.py index 5204a3c2..032c97a8 100644 --- a/src/poli/core/abstract_benchmark.py +++ b/src/poli/core/abstract_benchmark.py @@ -16,7 +16,7 @@ def __init__( batch_size: Union[int, None] = None, parallelize: bool = False, num_workers: Union[int, None] = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ) -> None: self.seed = seed self.batch_size = batch_size diff --git a/src/poli/core/abstract_black_box.py b/src/poli/core/abstract_black_box.py index f67037a2..57b5e030 100644 --- a/src/poli/core/abstract_black_box.py +++ b/src/poli/core/abstract_black_box.py @@ -2,6 +2,8 @@ all objective functions should inherit. """ +from __future__ import annotations + from multiprocessing import Pool, cpu_count from warnings import warn @@ -30,7 +32,7 @@ class AbstractBlackBox: which uses half of the available CPU cores. evaluation_budget : int, optional The maximum number of evaluations allowed for the black box function. - Default is float("inf"). + Default is None). Attributes ---------- @@ -71,10 +73,10 @@ class AbstractBlackBox: def __init__( self, - batch_size: int = None, + batch_size: int | None = None, parallelize: bool = False, - num_workers: int = None, - evaluation_budget: int = float("inf"), + num_workers: int | None = None, + evaluation_budget: int | None = None, force_isolation: bool = False, ): """ @@ -89,12 +91,14 @@ def __init__( 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"). + The maximum number of evaluations allowed for the black box function, by default it is None, which means no limit. """ self.observer = None self.observer_info = None self.parallelize = parallelize - self.evaluation_budget = evaluation_budget + self.evaluation_budget = ( + evaluation_budget if evaluation_budget is not None else float("inf") + ) self.num_evaluations = 0 self.force_isolation = force_isolation diff --git a/src/poli/core/abstract_problem_factory.py b/src/poli/core/abstract_problem_factory.py index 73ca3854..f7caa825 100644 --- a/src/poli/core/abstract_problem_factory.py +++ b/src/poli/core/abstract_problem_factory.py @@ -34,7 +34,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/core/chemistry/tdc_black_box.py b/src/poli/core/chemistry/tdc_black_box.py index 8f121bff..d3cf8c07 100644 --- a/src/poli/core/chemistry/tdc_black_box.py +++ b/src/poli/core/chemistry/tdc_black_box.py @@ -64,7 +64,7 @@ class TDCBlackBox(AbstractBlackBox): Methods ------- - __init__(self, oracle_name, string_representation="SMILES", force_isolation=False, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf"), **kwargs_for_oracle + __init__(self, oracle_name, string_representation="SMILES", force_isolation=False, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None, **kwargs_for_oracle Initializes a new instance of the abstract TDC class. References @@ -83,7 +83,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, **kwargs_for_oracle, ): if parallelize: diff --git a/src/poli/core/lambda_black_box.py b/src/poli/core/lambda_black_box.py index 10d3646e..024ae7d7 100644 --- a/src/poli/core/lambda_black_box.py +++ b/src/poli/core/lambda_black_box.py @@ -43,7 +43,7 @@ class LambdaBlackBox(AbstractBlackBox): which uses half of the available CPU cores. evaluation_budget : int, optional The maximum number of evaluations allowed for the black box function. - Default is float("inf"). + Default is None). force_isolation : bool, optional Flag indicating whether to force isolation of the black box function. In this black box, this flag is ignored. @@ -56,7 +56,7 @@ def __init__( batch_size=None, parallelize=False, num_workers=None, - evaluation_budget=float("inf"), + evaluation_budget=None, force_isolation=False, ): super().__init__( diff --git a/src/poli/core/proteins/foldx_black_box.py b/src/poli/core/proteins/foldx_black_box.py index 7c404f9b..7705d9f7 100644 --- a/src/poli/core/proteins/foldx_black_box.py +++ b/src/poli/core/proteins/foldx_black_box.py @@ -89,7 +89,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, wildtype_pdb_path: Union[Path, List[Path]] = None, alphabet: List[str] = None, experiment_id: str = None, diff --git a/src/poli/core/util/isolation/isolated_black_box.py b/src/poli/core/util/isolation/isolated_black_box.py index 703860ab..fc055b3d 100644 --- a/src/poli/core/util/isolation/isolated_black_box.py +++ b/src/poli/core/util/isolation/isolated_black_box.py @@ -8,7 +8,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, **kwargs_for_black_box, ): diff --git a/src/poli/objective_factory.py b/src/poli/objective_factory.py index da889f57..59b3a4f8 100644 --- a/src/poli/objective_factory.py +++ b/src/poli/objective_factory.py @@ -46,7 +46,7 @@ def __create_problem_from_repository( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, observer: AbstractObserver = None, **kwargs_for_factory, @@ -121,7 +121,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, quiet: bool = False, **kwargs_for_factory, ) -> Problem: diff --git a/src/poli/objective_repository/albuterol_similarity/register.py b/src/poli/objective_repository/albuterol_similarity/register.py index 2ed62032..c8f5718c 100644 --- a/src/poli/objective_repository/albuterol_similarity/register.py +++ b/src/poli/objective_repository/albuterol_similarity/register.py @@ -71,7 +71,7 @@ class AlbuterolSimilarityBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes an instance of the black box. References @@ -93,7 +93,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Albuterol_Similarity", @@ -152,7 +152,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/aloha/register.py b/src/poli/objective_repository/aloha/register.py index dc0352b1..ce30334f 100644 --- a/src/poli/objective_repository/aloha/register.py +++ b/src/poli/objective_repository/aloha/register.py @@ -58,7 +58,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): """ Initialize the aloha black box object. @@ -147,7 +147,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/amlodipine_mpo/register.py b/src/poli/objective_repository/amlodipine_mpo/register.py index 3da805db..6ba0cb89 100644 --- a/src/poli/objective_repository/amlodipine_mpo/register.py +++ b/src/poli/objective_repository/amlodipine_mpo/register.py @@ -67,7 +67,7 @@ class AmlodipineMPOBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -88,7 +88,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Amlodipine_MPO", @@ -149,7 +149,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/celecoxib_rediscovery/register.py b/src/poli/objective_repository/celecoxib_rediscovery/register.py index ecfafe97..03a29764 100644 --- a/src/poli/objective_repository/celecoxib_rediscovery/register.py +++ b/src/poli/objective_repository/celecoxib_rediscovery/register.py @@ -68,7 +68,7 @@ class CelecoxibRediscoveryBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -90,7 +90,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Celecoxib_Rediscovery", @@ -150,7 +150,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/deco_hop/register.py b/src/poli/objective_repository/deco_hop/register.py index 70257176..0d806d0d 100644 --- a/src/poli/objective_repository/deco_hop/register.py +++ b/src/poli/objective_repository/deco_hop/register.py @@ -63,7 +63,7 @@ class DecoHopBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Creates a DecoHopBlackBox instance. References @@ -85,7 +85,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Deco Hop", @@ -144,7 +144,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/dms_gb1/register.py b/src/poli/objective_repository/dms_gb1/register.py index cdecf1e7..968242a9 100644 --- a/src/poli/objective_repository/dms_gb1/register.py +++ b/src/poli/objective_repository/dms_gb1/register.py @@ -49,7 +49,7 @@ class DMSGB1BlackBox(AbstractBlackBox): num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). Methods ------- @@ -71,7 +71,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): """ @@ -90,7 +90,7 @@ def __init__( num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). """ if parallelize: print( @@ -175,7 +175,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ @@ -197,7 +197,7 @@ def create( num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). Returns ------- diff --git a/src/poli/objective_repository/dms_trpb/register.py b/src/poli/objective_repository/dms_trpb/register.py index 48dade73..b8d23b31 100644 --- a/src/poli/objective_repository/dms_trpb/register.py +++ b/src/poli/objective_repository/dms_trpb/register.py @@ -49,7 +49,7 @@ class DMSTrpBBlackBox(AbstractBlackBox): num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). Methods ------- @@ -67,7 +67,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): """ @@ -86,7 +86,7 @@ def __init__( num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). """ if parallelize: print( @@ -171,7 +171,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ @@ -193,7 +193,7 @@ def create( num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). Returns ------- diff --git a/src/poli/objective_repository/dockstring/register.py b/src/poli/objective_repository/dockstring/register.py index 3d630a77..e537b119 100644 --- a/src/poli/objective_repository/dockstring/register.py +++ b/src/poli/objective_repository/dockstring/register.py @@ -78,7 +78,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): """ @@ -203,7 +203,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """Creates a dockstring black box function and initial observations. diff --git a/src/poli/objective_repository/drd2_docking/register.py b/src/poli/objective_repository/drd2_docking/register.py index 8a7186df..8854879d 100644 --- a/src/poli/objective_repository/drd2_docking/register.py +++ b/src/poli/objective_repository/drd2_docking/register.py @@ -68,7 +68,7 @@ class DRD2BlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -90,7 +90,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="DRD2", @@ -150,7 +150,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/drd3_docking/register.py b/src/poli/objective_repository/drd3_docking/register.py index 8d971ac4..eb849ecb 100644 --- a/src/poli/objective_repository/drd3_docking/register.py +++ b/src/poli/objective_repository/drd3_docking/register.py @@ -69,7 +69,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="3pbl_docking", @@ -118,7 +118,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/ehrlich/register.py b/src/poli/objective_repository/ehrlich/register.py index ae166c61..5c64f8fa 100644 --- a/src/poli/objective_repository/ehrlich/register.py +++ b/src/poli/objective_repository/ehrlich/register.py @@ -115,7 +115,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): warnings.warn( "This EhrlichBlackBox class is different from the original " @@ -409,7 +409,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/ehrlich_holo/isolated_function.py b/src/poli/objective_repository/ehrlich_holo/isolated_function.py index 69d4efaa..839e6cd5 100644 --- a/src/poli/objective_repository/ehrlich_holo/isolated_function.py +++ b/src/poli/objective_repository/ehrlich_holo/isolated_function.py @@ -32,7 +32,7 @@ def __init__( alphabet: list[str] = AMINO_ACIDS, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): self.sequence_length = sequence_length self.motif_length = motif_length diff --git a/src/poli/objective_repository/ehrlich_holo/register.py b/src/poli/objective_repository/ehrlich_holo/register.py index 73c5b228..4531bb7a 100644 --- a/src/poli/objective_repository/ehrlich_holo/register.py +++ b/src/poli/objective_repository/ehrlich_holo/register.py @@ -94,7 +94,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): super().__init__(batch_size, parallelize, num_workers, evaluation_budget) @@ -222,7 +222,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/fexofenadine_mpo/register.py b/src/poli/objective_repository/fexofenadine_mpo/register.py index e22a8454..5d1cdfa4 100644 --- a/src/poli/objective_repository/fexofenadine_mpo/register.py +++ b/src/poli/objective_repository/fexofenadine_mpo/register.py @@ -67,7 +67,7 @@ class FexofenadineMPOBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -88,7 +88,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Fexofenadine_MPO", @@ -147,7 +147,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/foldx_rfp_lambo/register.py b/src/poli/objective_repository/foldx_rfp_lambo/register.py index c36b0cee..1d45c362 100644 --- a/src/poli/objective_repository/foldx_rfp_lambo/register.py +++ b/src/poli/objective_repository/foldx_rfp_lambo/register.py @@ -22,7 +22,7 @@ def __init__( parallelize: bool = False, num_workers: int = None, batch_size: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): super().__init__( @@ -83,7 +83,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ @@ -101,7 +101,7 @@ def create( num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). force_isolation : bool, optional Should the problem Returns diff --git a/src/poli/objective_repository/foldx_sasa/register.py b/src/poli/objective_repository/foldx_sasa/register.py index f72cef59..b4d2cd69 100644 --- a/src/poli/objective_repository/foldx_sasa/register.py +++ b/src/poli/objective_repository/foldx_sasa/register.py @@ -71,7 +71,7 @@ def __init__( batch_size: int = 1, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): super().__init__( @@ -174,7 +174,7 @@ def create( batch_size: int = 1, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/foldx_stability/register.py b/src/poli/objective_repository/foldx_stability/register.py index 733a157a..972cbe7b 100644 --- a/src/poli/objective_repository/foldx_stability/register.py +++ b/src/poli/objective_repository/foldx_stability/register.py @@ -78,7 +78,7 @@ def __init__( batch_size: int = 1, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): super().__init__( @@ -177,7 +177,7 @@ def create( batch_size: int = 1, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/foldx_stability_and_sasa/register.py b/src/poli/objective_repository/foldx_stability_and_sasa/register.py index a8cb1ea3..a7f39bf9 100644 --- a/src/poli/objective_repository/foldx_stability_and_sasa/register.py +++ b/src/poli/objective_repository/foldx_stability_and_sasa/register.py @@ -73,7 +73,7 @@ def __init__( batch_size: int = 1, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): super().__init__( @@ -175,7 +175,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/gfp_cbas/register.py b/src/poli/objective_repository/gfp_cbas/register.py index b9c960bd..6e113c06 100644 --- a/src/poli/objective_repository/gfp_cbas/register.py +++ b/src/poli/objective_repository/gfp_cbas/register.py @@ -24,7 +24,7 @@ def __init__( parallelize: bool = False, num_workers: int = None, seed: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, negate: bool = False, ): @@ -118,7 +118,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, negate: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/gfp_select/register.py b/src/poli/objective_repository/gfp_select/register.py index d5f989bd..b5dbcecf 100644 --- a/src/poli/objective_repository/gfp_select/register.py +++ b/src/poli/objective_repository/gfp_select/register.py @@ -15,7 +15,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, seed: int = None, force_isolation: bool = False, ): @@ -70,7 +70,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: if seed is not None: diff --git a/src/poli/objective_repository/gsk3_beta/register.py b/src/poli/objective_repository/gsk3_beta/register.py index 691d7b60..9856b250 100644 --- a/src/poli/objective_repository/gsk3_beta/register.py +++ b/src/poli/objective_repository/gsk3_beta/register.py @@ -102,7 +102,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="GSK3B", @@ -167,7 +167,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/isomer_c7h8n2o2/register.py b/src/poli/objective_repository/isomer_c7h8n2o2/register.py index 2a9f9ea2..2d823d84 100644 --- a/src/poli/objective_repository/isomer_c7h8n2o2/register.py +++ b/src/poli/objective_repository/isomer_c7h8n2o2/register.py @@ -88,7 +88,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Isomers_C7H8N2O2", @@ -147,7 +147,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/isomer_c9h10n2o2pf2cl/register.py b/src/poli/objective_repository/isomer_c9h10n2o2pf2cl/register.py index 6d8ec1d5..9f35ebb1 100644 --- a/src/poli/objective_repository/isomer_c9h10n2o2pf2cl/register.py +++ b/src/poli/objective_repository/isomer_c9h10n2o2pf2cl/register.py @@ -90,7 +90,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Isomers_C9H10N2O2PF2Cl", @@ -150,7 +150,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/jnk3/register.py b/src/poli/objective_repository/jnk3/register.py index 6d22af86..fe5e352d 100644 --- a/src/poli/objective_repository/jnk3/register.py +++ b/src/poli/objective_repository/jnk3/register.py @@ -99,7 +99,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="JNK3", @@ -163,7 +163,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/median_1/register.py b/src/poli/objective_repository/median_1/register.py index 6c349f20..3260c392 100644 --- a/src/poli/objective_repository/median_1/register.py +++ b/src/poli/objective_repository/median_1/register.py @@ -87,7 +87,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Median 1", @@ -146,7 +146,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/median_2/register.py b/src/poli/objective_repository/median_2/register.py index 0dcc563d..f857236b 100644 --- a/src/poli/objective_repository/median_2/register.py +++ b/src/poli/objective_repository/median_2/register.py @@ -65,7 +65,7 @@ class Median2BlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -86,7 +86,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Median 2", @@ -145,7 +145,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/mestranol_similarity/register.py b/src/poli/objective_repository/mestranol_similarity/register.py index 5b03a542..d366d108 100644 --- a/src/poli/objective_repository/mestranol_similarity/register.py +++ b/src/poli/objective_repository/mestranol_similarity/register.py @@ -70,7 +70,7 @@ class MestranolSimilarityBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -91,7 +91,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Mestranol_Similarity", @@ -150,7 +150,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/osimetrinib_mpo/register.py b/src/poli/objective_repository/osimetrinib_mpo/register.py index b6c9c642..45b3c79e 100644 --- a/src/poli/objective_repository/osimetrinib_mpo/register.py +++ b/src/poli/objective_repository/osimetrinib_mpo/register.py @@ -65,7 +65,7 @@ class OsimetrinibMPOBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf") + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None) Initializes the black box. References @@ -87,7 +87,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Osimetrinib_MPO", @@ -146,7 +146,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/penalized_logp_lambo/register.py b/src/poli/objective_repository/penalized_logp_lambo/register.py index c088379e..ed0d545d 100644 --- a/src/poli/objective_repository/penalized_logp_lambo/register.py +++ b/src/poli/objective_repository/penalized_logp_lambo/register.py @@ -41,7 +41,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): super().__init__( @@ -110,7 +110,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Tuple[AbstractBlackBox, np.ndarray, np.ndarray]: if seed is not None: diff --git a/src/poli/objective_repository/perindopril_mpo/register.py b/src/poli/objective_repository/perindopril_mpo/register.py index 40b51f43..cd3ee4d1 100644 --- a/src/poli/objective_repository/perindopril_mpo/register.py +++ b/src/poli/objective_repository/perindopril_mpo/register.py @@ -86,7 +86,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Perindopril_MPO", @@ -145,7 +145,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/ranolazine_mpo/register.py b/src/poli/objective_repository/ranolazine_mpo/register.py index d83b183d..450ef325 100644 --- a/src/poli/objective_repository/ranolazine_mpo/register.py +++ b/src/poli/objective_repository/ranolazine_mpo/register.py @@ -65,7 +65,7 @@ class RanolazineMPOBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -87,7 +87,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Ranolazine_MPO", @@ -146,7 +146,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/rasp/register.py b/src/poli/objective_repository/rasp/register.py index 967cb37a..d5ea4f07 100644 --- a/src/poli/objective_repository/rasp/register.py +++ b/src/poli/objective_repository/rasp/register.py @@ -59,7 +59,7 @@ class RaspBlackBox(AbstractBlackBox): num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). Methods ------- @@ -97,7 +97,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): """ @@ -134,7 +134,7 @@ def __init__( num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). Raises: ------- @@ -247,7 +247,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ @@ -287,7 +287,7 @@ def create( num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). Returns ------- diff --git a/src/poli/objective_repository/rdkit_logp/register.py b/src/poli/objective_repository/rdkit_logp/register.py index 4e97ecb4..88e97728 100644 --- a/src/poli/objective_repository/rdkit_logp/register.py +++ b/src/poli/objective_repository/rdkit_logp/register.py @@ -81,7 +81,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): """ @@ -187,7 +187,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """Creates a logP problem instance. diff --git a/src/poli/objective_repository/rdkit_qed/register.py b/src/poli/objective_repository/rdkit_qed/register.py index c1b0843f..543852d8 100644 --- a/src/poli/objective_repository/rdkit_qed/register.py +++ b/src/poli/objective_repository/rdkit_qed/register.py @@ -82,7 +82,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): """ Initialize the QEDBlackBox. @@ -104,7 +104,7 @@ def __init__( 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"). + The maximum number of evaluations, by default None). """ super().__init__( batch_size=batch_size, @@ -223,7 +223,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """Creates a QED black box function and initial observations. @@ -242,7 +242,7 @@ def create( 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"). + The maximum number of evaluations, by default None). Returns ------- diff --git a/src/poli/objective_repository/rfp_foldx_stability/register.py b/src/poli/objective_repository/rfp_foldx_stability/register.py index a49dd96c..29bb829c 100644 --- a/src/poli/objective_repository/rfp_foldx_stability/register.py +++ b/src/poli/objective_repository/rfp_foldx_stability/register.py @@ -19,7 +19,7 @@ def __init__( batch_size=1, parallelize=False, num_workers=None, - evaluation_budget=float("inf"), + evaluation_budget=None, force_isolation=False, ): RFP_FOLDX_ASSETS_DIR = Path(__file__).parent / "assets" @@ -57,7 +57,7 @@ def create( batch_size=1, parallelize=False, num_workers=None, - evaluation_budget=float("inf"), + evaluation_budget=None, force_isolation=False, ): if seed is not None: diff --git a/src/poli/objective_repository/rfp_foldx_stability_and_sasa/register.py b/src/poli/objective_repository/rfp_foldx_stability_and_sasa/register.py index 1deda020..d4351262 100644 --- a/src/poli/objective_repository/rfp_foldx_stability_and_sasa/register.py +++ b/src/poli/objective_repository/rfp_foldx_stability_and_sasa/register.py @@ -53,7 +53,7 @@ def create( batch_size: int = 1, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/rfp_rasp/register.py b/src/poli/objective_repository/rfp_rasp/register.py index 2a1d2633..0e33397d 100644 --- a/src/poli/objective_repository/rfp_rasp/register.py +++ b/src/poli/objective_repository/rfp_rasp/register.py @@ -19,7 +19,7 @@ def __init__( batch_size=None, parallelize=False, num_workers=None, - evaluation_budget=float("inf"), + evaluation_budget=None, force_isolation=False, ): RFP_PDB_PATH = Path(__file__).parent / "assets" @@ -60,7 +60,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): if seed is not None: diff --git a/src/poli/objective_repository/rmf_landscape/register.py b/src/poli/objective_repository/rmf_landscape/register.py index 6ae20933..a4253de3 100644 --- a/src/poli/objective_repository/rmf_landscape/register.py +++ b/src/poli/objective_repository/rmf_landscape/register.py @@ -51,7 +51,7 @@ class RMFBlackBox(AbstractBlackBox): num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). force_isolation : bool, optional Run in an isolated environment and process, by default False. """ @@ -67,7 +67,7 @@ def __init__( batch_size: int | None = None, parallelize: bool | None = False, num_workers: int | None = None, - evaluation_budget: int | None = float("inf"), + evaluation_budget: int | None = None, force_isolation: bool = False, ) -> None: """ @@ -82,7 +82,7 @@ def __init__( num_workers : int, optional Number of workers for parallel evaluation, default: None. evaluation_budget : int, optional - Maximum number of evaluations, default: float("inf"). + Maximum number of evaluations, default: None). force_isolation: bool Run the blackbox in an isolated environment, default: False. """ @@ -178,7 +178,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/rosetta_energy/register.py b/src/poli/objective_repository/rosetta_energy/register.py index 4cfb1159..0c567959 100644 --- a/src/poli/objective_repository/rosetta_energy/register.py +++ b/src/poli/objective_repository/rosetta_energy/register.py @@ -138,7 +138,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): super().__init__( @@ -239,7 +239,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ @@ -288,7 +288,7 @@ def create( num_workers : int, optional The number of workers for parallel evaluation, by default None. evaluation_budget : int, optional - The evaluation budget, by default float("inf"). + The evaluation budget, by default None). Returns ------- diff --git a/src/poli/objective_repository/sa_tdc/register.py b/src/poli/objective_repository/sa_tdc/register.py index c0f175ed..3769015f 100644 --- a/src/poli/objective_repository/sa_tdc/register.py +++ b/src/poli/objective_repository/sa_tdc/register.py @@ -55,7 +55,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): """ @@ -79,7 +79,7 @@ def __init__( 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"). + The maximum number of evaluations, by default None). """ super().__init__( oracle_name="SA", @@ -125,7 +125,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/scaffold_hop/register.py b/src/poli/objective_repository/scaffold_hop/register.py index 1eda1978..f136a03e 100644 --- a/src/poli/objective_repository/scaffold_hop/register.py +++ b/src/poli/objective_repository/scaffold_hop/register.py @@ -65,7 +65,7 @@ class ScaffoldHopBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -87,7 +87,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Scaffold Hop", @@ -146,7 +146,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/sitagliptin_mpo/register.py b/src/poli/objective_repository/sitagliptin_mpo/register.py index 39c76d85..cf230d16 100644 --- a/src/poli/objective_repository/sitagliptin_mpo/register.py +++ b/src/poli/objective_repository/sitagliptin_mpo/register.py @@ -65,7 +65,7 @@ class SitagliptinMPOBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -86,7 +86,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Sitagliptin_MPO", @@ -145,7 +145,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/super_mario_bros/register.py b/src/poli/objective_repository/super_mario_bros/register.py index 6ac9cb1e..d6eb1d6d 100644 --- a/src/poli/objective_repository/super_mario_bros/register.py +++ b/src/poli/objective_repository/super_mario_bros/register.py @@ -64,7 +64,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ): """ @@ -150,7 +150,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """Creates a new instance of the Super Mario Bros problem. diff --git a/src/poli/objective_repository/thiothixene_rediscovery/register.py b/src/poli/objective_repository/thiothixene_rediscovery/register.py index a295023a..8cc3236e 100644 --- a/src/poli/objective_repository/thiothixene_rediscovery/register.py +++ b/src/poli/objective_repository/thiothixene_rediscovery/register.py @@ -68,7 +68,7 @@ class ThiothixeneRediscoveryBlackBox(TDCBlackBox): Methods ------- - __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=float("inf")) + __init__(self, string_representation, force_isolation, batch_size=None, parallelize=False, num_workers=None, evaluation_budget=None)) Initializes the black box. References @@ -89,7 +89,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Thiothixene_Rediscovery", @@ -147,7 +147,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/toy_continuous_problem/register.py b/src/poli/objective_repository/toy_continuous_problem/register.py index f701b3b9..b89838e5 100644 --- a/src/poli/objective_repository/toy_continuous_problem/register.py +++ b/src/poli/objective_repository/toy_continuous_problem/register.py @@ -47,7 +47,7 @@ class ToyContinuousBlackBox(AbstractBlackBox): 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"). + The maximum number of evaluations, by default None). Attributes ---------- @@ -78,7 +78,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): assert ( @@ -158,7 +158,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/troglitazone_rediscovery/register.py b/src/poli/objective_repository/troglitazone_rediscovery/register.py index 6ddfbeb0..e1021ca0 100644 --- a/src/poli/objective_repository/troglitazone_rediscovery/register.py +++ b/src/poli/objective_repository/troglitazone_rediscovery/register.py @@ -89,7 +89,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Troglitazone_Rediscovery", @@ -147,7 +147,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/valsartan_smarts/register.py b/src/poli/objective_repository/valsartan_smarts/register.py index 7cbc3176..a6334940 100644 --- a/src/poli/objective_repository/valsartan_smarts/register.py +++ b/src/poli/objective_repository/valsartan_smarts/register.py @@ -88,7 +88,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Valsartan_SMARTS", @@ -146,7 +146,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/white_noise/register.py b/src/poli/objective_repository/white_noise/register.py index c9265aea..ee433154 100644 --- a/src/poli/objective_repository/white_noise/register.py +++ b/src/poli/objective_repository/white_noise/register.py @@ -45,7 +45,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): """ Initializes a WhiteNoiseBlackBox. @@ -63,7 +63,7 @@ def __init__( The number of workers for parallel evaluation, by default None (which corresponds to half the CPUs available, rounded downwards). evaluation_budget : int, optional - The maximum number of evaluations, by default float("inf"). + The maximum number of evaluations, by default None). """ super().__init__( batch_size=batch_size, @@ -110,7 +110,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """ diff --git a/src/poli/objective_repository/zaleplon_mpo/register.py b/src/poli/objective_repository/zaleplon_mpo/register.py index eb57a036..236ffeb2 100644 --- a/src/poli/objective_repository/zaleplon_mpo/register.py +++ b/src/poli/objective_repository/zaleplon_mpo/register.py @@ -87,7 +87,7 @@ def __init__( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, ): super().__init__( oracle_name="Zaleplon_MPO", @@ -146,7 +146,7 @@ def create( batch_size: int = None, parallelize: bool = False, num_workers: int = None, - evaluation_budget: int = float("inf"), + evaluation_budget: int = None, force_isolation: bool = False, ) -> Problem: """