File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 40
40
from bayes_opt .target_space import TargetSpace
41
41
42
42
if TYPE_CHECKING :
43
- from collections .abc import Callable
43
+ from collections .abc import Callable , Sequence
44
44
45
45
from numpy .typing import NDArray
46
46
from scipy .optimize import OptimizeResult
@@ -912,18 +912,18 @@ class GPHedge(AcquisitionFunction):
912
912
913
913
Parameters
914
914
----------
915
- base_acquisitions : List [AcquisitionFunction]
916
- List of base acquisition functions.
915
+ base_acquisitions : Sequence [AcquisitionFunction]
916
+ Sequence of base acquisition functions.
917
917
918
918
random_state : int, RandomState, default None
919
919
Set the random state for reproducibility.
920
920
"""
921
921
922
922
def __init__ (
923
- self , base_acquisitions : list [AcquisitionFunction ], random_state : int | RandomState | None = None
923
+ self , base_acquisitions : Sequence [AcquisitionFunction ], random_state : int | RandomState | None = None
924
924
) -> None :
925
925
super ().__init__ (random_state )
926
- self .base_acquisitions = base_acquisitions
926
+ self .base_acquisitions = list ( base_acquisitions )
927
927
self .n_acq = len (self .base_acquisitions )
928
928
self .gains = np .zeros (self .n_acq )
929
929
self .previous_candidates = None
You can’t perform that action at this time.
0 commit comments