Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
janosg committed Aug 13, 2023
1 parent a6526b4 commit 9447b0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/estimagic/parameters/parameter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def get_params_groups_and_short_names(params, free_mask, max_group_size=8):
if len(pd.unique(groups)) == len(groups):
groups = ["Parameters"] * len(groups)

groups = groups
counts = pd.value_counts(groups)
to_be_split = counts[counts > max_group_size]
for group_name, n_occurrences in to_be_split.items():
Expand Down
20 changes: 10 additions & 10 deletions tests/optimization/test_tao_optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_max_iters():
algo_options={"stopping.max_iterations": 25},
)

assert result.message == "user defined" or result.message == "step size small"
assert result.message in ("user defined", "step size small")


def test_grtol():
Expand All @@ -99,9 +99,9 @@ def test_grtol():
},
)

assert (
result.message == "relative_gradient_tolerance below critical value"
or result.message == "step size small"
assert result.message in (
"relative_gradient_tolerance below critical value",
"step size small",
)


Expand All @@ -123,9 +123,9 @@ def test_gatol():
},
)

assert (
result.message == "absolute_gradient_tolerance below critical value"
or result.message == "step size small"
assert result.message in (
"absolute_gradient_tolerance below critical value",
"step size small",
)


Expand All @@ -147,9 +147,9 @@ def test_gttol():
},
)

assert (
result.message == "gradient_total_tolerance below critical value"
or result.message == "step size small"
assert result.message in (
"gradient_total_tolerance below critical value",
"step size small",
)


Expand Down

0 comments on commit 9447b0c

Please sign in to comment.