Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moi90 committed Dec 26, 2023
1 parent e9c7073 commit b92935f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion experitur/core/configurators.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ class Clear(Configurator):
*names (str): Parameter names to remove from the configuration.
"""

__str_attrs__ = ("names",)
__str_attrs__ = ("patterns",)

def __init__(self, *patterns: str):
self.patterns = patterns
Expand Down
4 changes: 2 additions & 2 deletions experitur/core/trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -1511,9 +1511,9 @@ def filter(self, fn: Callable[[Trial], bool]) -> "TrialCollectionGroupby":

return TrialCollectionGroupby({k: v.filter(fn) for k, v in self.groups.items()})

def best_n(self, n, minimize: Objective = None, maximize: Objective = None):
def best_n(self, n, *, minimize: Objective = None, maximize: Objective = None):
return TrialCollectionGroupby(
{k: v.best_n(n, minimize, maximize) for k, v in self.groups.items()}
{k: v.best_n(n, minimize=minimize, maximize=maximize) for k, v in self.groups.items()}
)

def pareto_optimal(self, minimize: Objective = None, maximize: Objective = None):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def raising_fun(*_, **__):

with pytest.raises(
SpecialException,
match=re.escape("Error calling"),
match=re.escape(""),
):
trial.prefixed("__empty1c_").call(raising_fun)

Expand Down

0 comments on commit b92935f

Please # to comment.