Skip to content

Commit f7b9083

Browse files
committed
change para name back to 'iters_p_dim'
1 parent af91b73 commit f7b9083

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/gradient_free_optimizers/optimizer_search/powells_method.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class PowellsMethod(_PowellsMethod, Search):
4242
n_neighbours : int
4343
The number of neighbours to sample and evaluate before moving to the best
4444
of those neighbours.
45-
iters_per_direction : int
45+
iters_p_dim : int
4646
Number of evaluations per direction during line search.
4747
line_search : str
4848
Line search method: "grid" (default), "golden", or "hill_climb".
@@ -66,7 +66,7 @@ def __init__(
6666
epsilon: float = 0.03,
6767
distribution: str = "normal",
6868
n_neighbours: int = 3,
69-
iters_per_direction: int = 10,
69+
iters_p_dim: int = 10,
7070
line_search: Literal["grid", "golden", "hill_climb"] = "grid",
7171
convergence_threshold: float = 1e-8,
7272
):
@@ -80,7 +80,7 @@ def __init__(
8080
epsilon=epsilon,
8181
distribution=distribution,
8282
n_neighbours=n_neighbours,
83-
iters_per_direction=iters_per_direction,
83+
iters_p_dim=iters_p_dim,
8484
line_search=line_search,
8585
convergence_threshold=convergence_threshold,
8686
)

src/gradient_free_optimizers/optimizers/global_opt/powells_method/powells_method.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545
epsilon=0.03,
4646
distribution="normal",
4747
n_neighbours=3,
48-
iters_per_direction=10,
48+
iters_p_dim=10,
4949
line_search="grid",
5050
convergence_threshold=1e-8,
5151
):
@@ -72,7 +72,7 @@ def __init__(
7272
Distribution for hill climbing perturbations.
7373
n_neighbours : int, optional
7474
Number of neighbors for hill climbing.
75-
iters_per_direction : int, optional
75+
iters_p_dim : int, optional
7676
Number of evaluations per direction during line search.
7777
line_search : str, optional
7878
Line search method: "grid", "golden", or "hill_climb".
@@ -93,7 +93,7 @@ def __init__(
9393
n_neighbours=n_neighbours,
9494
)
9595

96-
self.iters_per_direction = iters_per_direction
96+
self.iters_p_dim = iters_p_dim
9797
self.line_search_method = line_search
9898
self.epsilon = epsilon
9999
self.distribution = distribution
@@ -143,7 +143,7 @@ def _start_direction_search(self):
143143
self.line_searcher.start(
144144
origin=self.pos_current.copy(),
145145
direction=direction.direction,
146-
max_iters=self.iters_per_direction,
146+
max_iters=self.iters_p_dim,
147147
)
148148

149149
def _finish_direction_search(self):

0 commit comments

Comments
 (0)