Skip to content

Commit 8bd9a34

Browse files
committed
change type hint for 'sampling'
1 parent 5daa5c2 commit 8bd9a34

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/gradient_free_optimizers/optimizer_search/bayesian_optimization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(
5858
nth_process: int = None,
5959
warm_start_smbo=None,
6060
max_sample_size: int = 10000000,
61-
sampling: dict = {"random": 1000000},
61+
sampling: Dict[Literal["random"], int] = {"random": 1000000},
6262
replacement: bool = True,
6363
gpr=gaussian_process["gp_nonlinear"],
6464
xi: float = 0.03,

src/gradient_free_optimizers/optimizer_search/direct_algorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
nth_process: int = None,
5454
warm_start_smbo=None,
5555
max_sample_size: int = 10000000,
56-
sampling: dict = {"random": 1000000},
56+
sampling: Dict[Literal["random"], int] = {"random": 1000000},
5757
replacement: bool = True,
5858
):
5959
super().__init__(

src/gradient_free_optimizers/optimizer_search/ensemble_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(
2121
nth_process: int = None,
2222
warm_start_smbo=None,
2323
max_sample_size: int = 10000000,
24-
sampling: dict = {"random": 1000000},
24+
sampling: Dict[Literal["random"], int] = {"random": 1000000},
2525
replacement: bool = True,
2626
):
2727
super().__init__(

src/gradient_free_optimizers/optimizer_search/forest_optimization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
nth_process: int = None,
6060
warm_start_smbo=None,
6161
max_sample_size: int = 10000000,
62-
sampling: dict = {"random": 1000000},
62+
sampling: Dict[Literal["random"], int] = {"random": 1000000},
6363
replacement: bool = True,
6464
tree_regressor="extra_tree",
6565
tree_para={"n_estimators": 100},

src/gradient_free_optimizers/optimizer_search/lipschitz_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
nth_process: int = None,
5454
warm_start_smbo=None,
5555
max_sample_size: int = 10000000,
56-
sampling: dict = {"random": 1000000},
56+
sampling: Dict[Literal["random"], int] = {"random": 1000000},
5757
replacement: bool = True,
5858
):
5959
super().__init__(

src/gradient_free_optimizers/optimizer_search/tree_structured_parzen_estimators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(
5757
nth_process: int = None,
5858
warm_start_smbo=None,
5959
max_sample_size: int = 10000000,
60-
sampling: dict = {"random": 1000000},
60+
sampling: Dict[Literal["random"], int] = {"random": 1000000},
6161
replacement: bool = True,
6262
gamma_tpe=0.2,
6363
):

0 commit comments

Comments
 (0)