Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/hyperactive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@

__version__ = importlib.metadata.version("hyperactive")
__license__ = "MIT"

__all__ = []
23 changes: 23 additions & 0 deletions src/hyperactive/base/_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,26 @@ def solve(self):
best_params = self._solve(experiment, **search_config)
self.best_params_ = best_params
return best_params

def _solve(self, experiment, *args, **kwargs):
"""Run the optimization search process.

Parameters
----------
experiment : BaseExperiment
The experiment to optimize parameters for.
*args : tuple
Positional arguments specific to the optimization backend.
**kwargs : dict
Keyword arguments specific to the optimization backend.

Returns
-------
dict with str keys
The best parameters found during the search.
Must have keys a subset or identical to experiment.paramnames().
"""
raise NotImplementedError(
"abstract method, BaseOptimizer._solve should be implemented by "
"descendant classes"
)
2 changes: 1 addition & 1 deletion src/hyperactive/opt/random_search.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Grid search optimizer."""
"""Random search optimizer."""

# copyright: hyperactive developers, MIT License (see LICENSE file)

Expand Down
Loading