diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index da52e7e4..8956a396 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -59,6 +59,9 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
+ exclude:
+ - os: "windows-latest"
+ python-version: "3.13"
fail-fast: false
@@ -93,6 +96,9 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
+ exclude:
+ - os: "windows-latest"
+ python-version: "3.13"
fail-fast: false
diff --git a/README.md b/README.md
index 8ee02d1c..a1c767f4 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,15 @@
+
+## Welcome to hyperactive
+
-
+
-
+**A unified interface for optimization algorithms and problems.**
----
-
-An optimization and data collection toolbox for convenient and fast prototyping of computationally expensive models.
-
-
+Hyperactive implements a collection of optimization algorithms, accessible through a unified experiment-based
+interface that separates optimization problems from algorithms. The library provides native implementations of algorithms from the Gradient-Free-Optimizers
+package alongside direct interfaces to Optuna and scikit-learn optimizers, supporting discrete, continuous, and mixed parameter spaces.
@@ -19,8 +20,7 @@
@@ -28,39 +28,148 @@
| **Open Source** | [](https://opensource.org/licenses/MIT) [](https://gc-os-ai.github.io/) |
|---|---|
-| **Community** | [](https://discord.com/invite/54ACzaFsn7) [](https://www.linkedin.com/company/german-center-for-open-source-ai) |
+| **Community** | [](https://discord.gg/7uKdHfdcJG) [](https://www.linkedin.com/company/german-center-for-open-source-ai) |
| **CI/CD** | [](https://github.com/SimonBlanke/hyperactive/actions/workflows/test.yml) [](https://www.hyperactive.net/en/latest/?badge=latest)
| **Code** | [](https://pypi.org/project/hyperactive/) [](https://www.python.org/) [](https://github.com/psf/black) |
+## Installation
-
+```console
+pip install hyperactive
+```
-## Hyperactive:
+## :zap: Quickstart
-- is [very easy](#hyperactive-is-very-easy-to-use) to learn but [extremly versatile](./examples/optimization_applications/search_space_example.py)
+### Maximizing a custom function
-- provides intelligent [optimization algorithms](#overview), support for all major [machine-learning frameworks](#overview) and many interesting [applications](#overview)
+```python
+import numpy as np
-- makes optimization [data collection](./examples/optimization_applications/meta_data_collection.py) simple
+# function to be maximized
+def problem(params):
+ x = params["x"]
+ y = params["y"]
-- saves your [computation time](./examples/optimization_applications/memory.py)
+ return -(x**2 + y**2)
-- supports [parallel computing](./examples/tested_and_supported_packages/multiprocessing_example.py)
+# discrete search space: dict of iterable, scikit-learn like grid space
+# (valid search space types depends on optimizer)
+search_space = {
+ "x": np.arange(-1, 1, 0.01),
+ "y": np.arange(-1, 2, 0.1),
+}
+from hyperactive.opt.gfo import HillClimbing
+hillclimbing = HillClimbing(
+ search_space=search_space,
+ n_iter=100,
+ experiment=problem,
+)
+# running the hill climbing search:
+best_params = hillclimbing.solve()
+```
-
-
-
+### experiment abstraction - example: scikit-learn CV experiment
+"experiment" abstraction = parametrized optimization problem
-As its name suggests Hyperactive started as a hyperparameter optimization package, but it has been generalized to solve expensive gradient-free optimization problems. It uses the [Gradient-Free-Optimizers](https://github.com/SimonBlanke/Gradient-Free-Optimizers) package as an optimization-backend and expands on it with additional features and tools.
+`hyperactive` provides a number of common experiments, e.g.,
+`scikit-learn` cross-validation experiments:
----
+```python
+import numpy as np
+from hyperactive.experiment.integrations import SklearnCvExperiment
+from sklearn.datasets import load_iris
+from sklearn.svm import SVC
+from sklearn.metrics import accuracy_score
+from sklearn.model_selection import KFold
+
+X, y = load_iris(return_X_y=True)
+
+# create experiment
+sklearn_exp = SklearnCvExperiment(
+ estimator=SVC(),
+ scoring=accuracy_score,
+ cv=KFold(n_splits=3, shuffle=True),
+ X=X,
+ y=y,
+)
+
+# experiments can be evaluated via "score"
+params = {"C": 1.0, "kernel": "linear"}
+score, add_info = sklearn_exp.score(params)
+
+# they can be used in optimizers like above
+from hyperactive.opt.gfo import HillClimbing
-
+search_space = {
+ "C": np.logspace(-2, 2, num=10),
+ "kernel": ["linear", "rbf"],
+}
+
+hillclimbing = HillClimbing(
+ search_space=search_space,
+ n_iter=100,
+ experiment=sklearn_exp,
+)
+
+best_params = hillclimbing.solve()
+```
+
+### full ML toolbox integration - example: scikit-learn
+
+Any `hyperactive` optimizer can be combined with the ML toolbox integrations!
+
+`OptCV` for tuning `scikit-learn` estimators with any `hyperactive` optimizer:
+
+```python
+# 1. defining the tuned estimator:
+from sklearn.svm import SVC
+from hyperactive.integrations.sklearn import OptCV
+from hyperactive.opt.gfo import HillClimbing
+
+search_space = {"kernel": ["linear", "rbf"], "C": [1, 10]}
+optimizer = HillClimbing(search_space=search_space, n_iter=20)
+tuned_svc = OptCV(SVC(), optimizer)
+
+# 2. fitting the tuned estimator:
+from sklearn.datasets import load_iris
+from sklearn.model_selection import train_test_split
+X, y = load_iris(return_X_y=True)
+X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
+
+tuned_svc.fit(X_train, y_train)
+
+y_pred = tuned_svc.predict(X_test)
+
+# 3. obtaining best parameters and best estimator
+best_params = tuned_svc.best_params_
+best_estimator = tuned_svc.best_estimator_
+```
+
+## :bulb: Key Concepts
+
+### Experiment-Based Architecture
+
+Hyperactive v5 introduces a clean separation between optimization algorithms and optimization problems through the **experiment abstraction**:
+
+- **Experiments** define *what* to optimize (the objective function and evaluation logic)
+- **Optimizers** define *how* to optimize (the search strategy and algorithm)
+
+This design allows you to:
+- Mix and match any optimizer with any experiment type
+- Create reusable experiment definitions for common ML tasks
+- Easily switch between different optimization strategies
+- Build complex optimization workflows with consistent interfaces
+**Built-in experiments include:**
+- `SklearnCvExperiment` - Cross-validation for sklearn estimators
+- `SktimeForecastingExperiment` - Time series forecasting optimization
+- Custom function experiments (pass any callable as experiment)
+
+
## Overview
@@ -92,97 +201,59 @@ Hyperactive features a collection of optimization algorithms that can be used fo
Local Search:
Global Search:
Population Methods:
Sequential Methods:
- |
-
- Machine Learning:
-
- Deep Learning:
-
- Parallel Computing:
+ Optuna Backend:
|
- Feature Engineering:
-
Machine Learning:
- Deep Learning:
-
- Data Collection:
-
- Miscellaneous:
-
|
+
+
+ |
@@ -202,799 +273,6 @@ The following packages are designed to support Hyperactive and expand its use ca
| [Search-Data-Collector](https://github.com/SimonBlanke/search-data-collector) | Simple tool to save search-data during or after the optimization run into csv-files. |
| [Search-Data-Explorer](https://github.com/SimonBlanke/search-data-explorer) | Visualize search-data with plotly inside a streamlit dashboard.
-If you want news about Hyperactive and related projects you can follow me on [twitter](https://twitter.com/blanke_simon).
-
-
-
-
-## Notebooks and Tutorials
-
-- [Introduction to Hyperactive](https://nbviewer.org/github/SimonBlanke/hyperactive-tutorial/blob/main/notebooks/hyperactive_tutorial.ipynb)
-
-
-
-
-## Installation
-
-The most recent version of Hyperactive is available on PyPi:
-
-[](https://pypi.org/project/hyperactive)
-[](https://pypi.org/project/hyperactive/)
-[](https://pypi.org/project/hyperactive/)
-
-```console
-pip install hyperactive
-```
-
-
-
-
-
-## Example
-
-```python
-from sklearn.model_selection import cross_val_score
-from sklearn.ensemble import GradientBoostingRegressor
-from sklearn.datasets import load_diabetes
-from hyperactive import Hyperactive
-
-data = load_diabetes()
-X, y = data.data, data.target
-
-# define the model in a function
-def model(opt):
- # pass the suggested parameter to the machine learning model
- gbr = GradientBoostingRegressor(
- n_estimators=opt["n_estimators"], max_depth=opt["max_depth"]
- )
- scores = cross_val_score(gbr, X, y, cv=4)
-
- # return a single numerical value
- return scores.mean()
-
-# search space determines the ranges of parameters you want the optimizer to search through
-search_space = {
- "n_estimators": list(range(10, 150, 5)),
- "max_depth": list(range(2, 12)),
-}
-
-# start the optimization run
-hyper = Hyperactive()
-hyper.add_search(model, search_space, n_iter=50)
-hyper.run()
-
-```
-
-
-
-## Hyperactive API reference
-
-
-
-
-### Basic Usage
-
-
- Hyperactive(verbosity, distribution, n_processes)
-
-- verbosity = ["progress_bar", "print_results", "print_times"]
- - Possible parameter types: (list, False)
- - The verbosity list determines what part of the optimization information will be printed in the command line.
-
-- distribution = "multiprocessing"
- - Possible parameter types: ("multiprocessing", "joblib", "pathos")
- - Determine, which distribution service you want to use. Each library uses different packages to pickle objects:
- - multiprocessing uses pickle
- - joblib uses dill
- - pathos uses cloudpickle
-
-
-- n_processes = "auto",
- - Possible parameter types: (str, int)
- - The maximum number of processes that are allowed to run simultaneously. If n_processes is of int-type there will only run n_processes-number of jobs simultaneously instead of all at once. So if n_processes=10 and n_jobs_total=35, then the schedule would look like this 10 - 10 - 10 - 5. This saves computational resources if there is a large number of n_jobs. If "auto", then n_processes is the sum of all n_jobs (from .add_search(...)).
-
-
-
-
-
- .add_search(objective_function, search_space, n_iter, optimizer, n_jobs, initialize, pass_through, callbacks, catch, max_score, early_stopping, random_state, memory, memory_warm_start)
-
-
-- objective_function
- - Possible parameter types: (callable)
- - The objective function defines the optimization problem. The optimization algorithm will try to maximize the numerical value that is returned by the objective function by trying out different parameters from the search space.
-
-
-- search_space
- - Possible parameter types: (dict)
- - Defines the space were the optimization algorithm can search for the best parameters for the given objective function.
-
-
-- n_iter
- - Possible parameter types: (int)
- - The number of iterations that will be performed during the optimization run. The entire iteration consists of the optimization-step, which decides the next parameter that will be evaluated and the evaluation-step, which will run the objective function with the chosen parameter and return the score.
-
-
-- optimizer = "default"
- - Possible parameter types: ("default", initialized optimizer object)
- - Instance of optimization class that can be imported from Hyperactive. "default" corresponds to the random search optimizer. The imported optimization classes from hyperactive are different from gfo. They only accept optimizer-specific-parameters. The following classes can be imported and used:
-
- - HillClimbingOptimizer
- - StochasticHillClimbingOptimizer
- - RepulsingHillClimbingOptimizer
- - SimulatedAnnealingOptimizer
- - DownhillSimplexOptimizer
- - RandomSearchOptimizer
- - GridSearchOptimizer
- - RandomRestartHillClimbingOptimizer
- - RandomAnnealingOptimizer
- - PowellsMethod
- - PatternSearch
- - ParallelTemperingOptimizer
- - ParticleSwarmOptimizer
- - SpiralOptimization
- - GeneticAlgorithmOptimizer
- - EvolutionStrategyOptimizer
- - DifferentialEvolutionOptimizer
- - BayesianOptimizer
- - LipschitzOptimizer
- - DirectAlgorithm
- - TreeStructuredParzenEstimators
- - ForestOptimizer
-
- - Example:
- ```python
- ...
-
- opt_hco = HillClimbingOptimizer(epsilon=0.08)
- hyper = Hyperactive()
- hyper.add_search(..., optimizer=opt_hco)
- hyper.run()
-
- ...
- ```
-
-
-- n_jobs = 1
- - Possible parameter types: (int)
- - Number of jobs to run in parallel. Those jobs are optimization runs that work independent from another (no information sharing). If n_jobs == -1 the maximum available number of cpu cores is used.
-
-
-- initialize = {"grid": 4, "random": 2, "vertices": 4}
- - Possible parameter types: (dict)
- - The initialization dictionary automatically determines a number of parameters that will be evaluated in the first n iterations (n is the sum of the values in initialize). The initialize keywords are the following:
- - grid
- - Initializes positions in a grid like pattern. Positions that cannot be put into a grid are randomly positioned. For very high dimensional search spaces (>30) this pattern becomes random.
- - vertices
- - Initializes positions at the vertices of the search space. Positions that cannot be put into a new vertex are randomly positioned.
-
- - random
- - Number of random initialized positions
-
- - warm_start
- - List of parameter dictionaries that marks additional start points for the optimization run.
-
- Example:
- ```python
- ...
- search_space = {
- "x1": list(range(10, 150, 5)),
- "x2": list(range(2, 12)),
- }
-
- ws1 = {"x1": 10, "x2": 2}
- ws2 = {"x1": 15, "x2": 10}
-
- hyper = Hyperactive()
- hyper.add_search(
- model,
- search_space,
- n_iter=30,
- initialize={"grid": 4, "random": 10, "vertices": 4, "warm_start": [ws1, ws2]},
- )
- hyper.run()
- ```
-
-
-- pass_through = {}
- - Possible parameter types: (dict)
- - The pass_through accepts a dictionary that contains information that will be passed to the objective-function argument. This information will not change during the optimization run, unless the user does so by himself (within the objective-function).
-
- Example:
- ```python
- ...
- def objective_function(para):
- para.pass_through["stuff1"] # <--- this variable is 1
- para.pass_through["stuff2"] # <--- this variable is 2
-
- score = -para["x1"] * para["x1"]
- return score
-
- pass_through = {
- "stuff1": 1,
- "stuff2": 2,
- }
-
- hyper = Hyperactive()
- hyper.add_search(
- model,
- search_space,
- n_iter=30,
- pass_through=pass_through,
- )
- hyper.run()
- ```
-
-
-- callbacks = {}
- - Possible parameter types: (dict)
- - The callbacks enables you to pass functions to hyperactive that are called every iteration during the optimization run. The function has access to the same argument as the objective-function. You can decide if the functions are called before or after the objective-function is evaluated via the keys of the callbacks-dictionary. The values of the dictionary are lists of the callback-functions. The following example should show they way to use callbacks:
-
-
- Example:
- ```python
- ...
-
- def callback_1(access):
- # do some stuff
-
- def callback_2(access):
- # do some stuff
-
- def callback_3(access):
- # do some stuff
-
- hyper = Hyperactive()
- hyper.add_search(
- objective_function,
- search_space,
- n_iter=100,
- callbacks={
- "after": [callback_1, callback_2],
- "before": [callback_3]
- },
- )
- hyper.run()
- ```
-
-
-- catch = {}
- - Possible parameter types: (dict)
- - The catch parameter provides a way to handle exceptions that occur during the evaluation of the objective-function or the callbacks. It is a dictionary that accepts the exception class as a key and the score that is returned instead as the value. This way you can handle multiple types of exceptions and return different scores for each.
- In the case of an exception it often makes sense to return `np.nan` as a score. You can see an example of this in the following code-snippet:
-
- Example:
- ```python
- ...
-
- hyper = Hyperactive()
- hyper.add_search(
- objective_function,
- search_space,
- n_iter=100,
- catch={
- ValueError: np.nan,
- },
- )
- hyper.run()
- ```
-
-
-- max_score = None
- - Possible parameter types: (float, None)
- - Maximum score until the optimization stops. The score will be checked after each completed iteration.
-
-
-- early_stopping=None
- - (dict, None)
- - Stops the optimization run early if it did not achive any score-improvement within the last iterations. The early_stopping-parameter enables to set three parameters:
- - `n_iter_no_change`: Non-optional int-parameter. This marks the last n iterations to look for an improvement over the iterations that came before n. If the best score of the entire run is within those last n iterations the run will continue (until other stopping criteria are met), otherwise the run will stop.
- - `tol_abs`: Optional float-paramter. The score must have improved at least this absolute tolerance in the last n iterations over the best score in the iterations before n. This is an absolute value, so 0.1 means an imporvement of 0.8 -> 0.9 is acceptable but 0.81 -> 0.9 would stop the run.
- - `tol_rel`: Optional float-paramter. The score must have imporved at least this relative tolerance (in percentage) in the last n iterations over the best score in the iterations before n. This is a relative value, so 10 means an imporvement of 0.8 -> 0.88 is acceptable but 0.8 -> 0.87 would stop the run.
-
- - random_state = None
- - Possible parameter types: (int, None)
- - Random state for random processes in the random, numpy and scipy module.
-
-
-- memory = "share"
- - Possible parameter types: (bool, "share")
- - Whether or not to use the "memory"-feature. The memory is a dictionary, which gets filled with parameters and scores during the optimization run. If the optimizer encounters a parameter that is already in the dictionary it just extracts the score instead of reevaluating the objective function (which can take a long time). If memory is set to "share" and there are multiple jobs for the same objective function then the memory dictionary is automatically shared between the different processes.
-
-- memory_warm_start = None
- - Possible parameter types: (pandas dataframe, None)
- - Pandas dataframe that contains score and parameter information that will be automatically loaded into the memory-dictionary.
-
- example:
-
-
-
-
- | score |
- x1 |
- x2 |
- x... |
-
-
-
-
- | 0.756 |
- 0.1 |
- 0.2 |
- ... |
-
-
- | 0.823 |
- 0.3 |
- 0.1 |
- ... |
-
-
- | ... |
- ... |
- ... |
- ... |
-
-
- | ... |
- ... |
- ... |
- ... |
-
-
-
-
-
-
-
-
-
-
- .run(max_time)
-
-- max_time = None
- - Possible parameter types: (float, None)
- - Maximum number of seconds until the optimization stops. The time will be checked after each completed iteration.
-
-
-
-
-
-
-
-### Special Parameters
-
-
- Objective Function
-
-Each iteration consists of two steps:
- - The optimization step: decides what position in the search space (parameter set) to evaluate next
- - The evaluation step: calls the objective function, which returns the score for the given position in the search space
-
-The objective function has one argument that is often called "para", "params", "opt" or "access".
-This argument is your access to the parameter set that the optimizer has selected in the
-corresponding iteration.
-
-```python
-def objective_function(opt):
- # get x1 and x2 from the argument "opt"
- x1 = opt["x1"]
- x2 = opt["x2"]
-
- # calculate the score with the parameter set
- score = -(x1 * x1 + x2 * x2)
-
- # return the score
- return score
-```
-
-The objective function always needs a score, which shows how "good" or "bad" the current parameter set is. But you can also return some additional information with a dictionary:
-
-```python
-def objective_function(opt):
- x1 = opt["x1"]
- x2 = opt["x2"]
-
- score = -(x1 * x1 + x2 * x2)
-
- other_info = {
- "x1 squared" : x1**2,
- "x2 squared" : x2**2,
- }
-
- return score, other_info
-```
-
-When you take a look at the results (a pandas dataframe with all iteration information) after the run has ended you will see the additional information in it. The reason we need a dictionary for this is because Hyperactive needs to know the names of the additonal parameters. The score does not need that, because it is always called "score" in the results. You can run [this example script](https://github.com/SimonBlanke/Hyperactive/blob/main/examples/optimization_applications/multiple_scores.py) if you want to give it a try.
-
-
-
-
-
- Search Space Dictionary
-
-The search space defines what values the optimizer can select during the search. These selected values will be inside the objective function argument and can be accessed like in a dictionary. The values in each search space dimension should always be in a list. If you use np.arange you should put it in a list afterwards:
-
-```python
-search_space = {
- "x1": list(np.arange(-100, 101, 1)),
- "x2": list(np.arange(-100, 101, 1)),
-}
-```
-
-A special feature of Hyperactive is shown in the next example. You can put not just numeric values into the search space dimensions, but also strings and functions. This enables a very high flexibility in how you can create your studies.
-
-```python
-def func1():
- # do stuff
- return stuff
-
-
-def func2():
- # do stuff
- return stuff
-
-
-search_space = {
- "x": list(np.arange(-100, 101, 1)),
- "str": ["a string", "another string"],
- "function" : [func1, func2],
-}
-```
-
-If you want to put other types of variables (like numpy arrays, pandas dataframes, lists, ...) into the search space you can do that via functions:
-
-```python
-def array1():
- return np.array([1, 2, 3])
-
-
-def array2():
- return np.array([3, 2, 1])
-
-
-search_space = {
- "x": list(np.arange(-100, 101, 1)),
- "str": ["a string", "another string"],
- "numpy_array" : [array1, array2],
-}
-```
-
-The functions contain the numpy arrays and returns them. This way you can use them inside the objective function.
-
-
-
-
-
-
- Optimizer Classes
-
-Each of the following optimizer classes can be initialized and passed to the "add_search"-method via the "optimizer"-argument. During this initialization the optimizer class accepts **only optimizer-specific-paramters** (no random_state, initialize, ... ):
-
- ```python
- optimizer = HillClimbingOptimizer(epsilon=0.1, distribution="laplace", n_neighbours=4)
- ```
-
- for the default parameters you can just write:
-
- ```python
- optimizer = HillClimbingOptimizer()
- ```
-
- and pass it to Hyperactive:
-
- ```python
- hyper = Hyperactive()
- hyper.add_search(model, search_space, optimizer=optimizer, n_iter=100)
- hyper.run()
- ```
-
- So the optimizer-classes are **different** from Gradient-Free-Optimizers. A more detailed explanation of the optimization-algorithms and the optimizer-specific-paramters can be found in the [Optimization Tutorial](https://github.com/SimonBlanke/optimization-tutorial).
-
-- HillClimbingOptimizer
-- RepulsingHillClimbingOptimizer
-- SimulatedAnnealingOptimizer
-- DownhillSimplexOptimizer
-- RandomSearchOptimizer
-- GridSearchOptimizer
-- RandomRestartHillClimbingOptimizer
-- RandomAnnealingOptimizer
-- PowellsMethod
-- PatternSearch
-- ParallelTemperingOptimizer
-- ParticleSwarmOptimizer
-- GeneticAlgorithmOptimizer
-- EvolutionStrategyOptimizer
-- DifferentialEvolutionOptimizer
-- BayesianOptimizer
-- TreeStructuredParzenEstimators
-- ForestOptimizer
-
-
-
-
-
-
-
-### Result Attributes
-
-
-
- .best_para(objective_function)
-
-- objective_function
- - (callable)
-- returnes: dictionary
-- Parameter dictionary of the best score of the given objective_function found in the previous optimization run.
-
- example:
- ```python
- {
- 'x1': 0.2,
- 'x2': 0.3,
- }
- ```
-
-
-
-
-
- .best_score(objective_function)
-
-- objective_function
- - (callable)
-- returns: int or float
-- Numerical value of the best score of the given objective_function found in the previous optimization run.
-
-
-
-
-
- .search_data(objective_function, times=False)
-
-- objective_function
- - (callable)
-- returns: Pandas dataframe
-- The dataframe contains score and parameter information of the given objective_function found in the optimization run. If the parameter `times` is set to True the evaluation- and iteration- times are added to the dataframe.
-
- example:
-
-
-
-
- | score |
- x1 |
- x2 |
- x... |
-
-
-
-
- | 0.756 |
- 0.1 |
- 0.2 |
- ... |
-
-
- | 0.823 |
- 0.3 |
- 0.1 |
- ... |
-
-
- | ... |
- ... |
- ... |
- ... |
-
-
- | ... |
- ... |
- ... |
- ... |
-
-
-
-
-
-
-
-
-
-
-
-## Roadmap
-
-
-
-v2.0.0 :heavy_check_mark:
-
- - [x] Change API
-
-
-
-
-v2.1.0 :heavy_check_mark:
-
- - [x] Save memory of evaluations for later runs (long term memory)
- - [x] Warm start sequence based optimizers with long term memory
- - [x] Gaussian process regressors from various packages (gpy, sklearn, GPflow, ...) via wrapper
-
-
-
-
-v2.2.0 :heavy_check_mark:
-
- - [x] Add basic dataset meta-features to long term memory
- - [x] Add helper-functions for memory
- - [x] connect two different model/dataset hashes
- - [x] split two different model/dataset hashes
- - [x] delete memory of model/dataset
- - [x] return best known model for dataset
- - [x] return search space for best model
- - [x] return best parameter for best model
-
-
-
-
-v2.3.0 :heavy_check_mark:
-
- - [x] Tree-structured Parzen Estimator
- - [x] Decision Tree Optimizer
- - [x] add "max_sample_size" and "skip_retrain" parameter for sbom to decrease optimization time
-
-
-
-
-v3.0.0 :heavy_check_mark:
-
- - [x] New API
- - [x] expand usage of objective-function
- - [x] No passing of training data into Hyperactive
- - [x] Removing "long term memory"-support (better to do in separate package)
- - [x] More intuitive selection of optimization strategies and parameters
- - [x] Separate optimization algorithms into other package
- - [x] expand api so that optimizer parameter can be changed at runtime
- - [x] add extensive testing procedure (similar to Gradient-Free-Optimizers)
-
-
-
-
-
-v3.1.0 :heavy_check_mark:
-
- - [x] Decouple number of runs from active processes (Thanks to [PartiallyTyped](https://github.com/PartiallyTyped))
-
-
-
-
-
-v3.2.0 :heavy_check_mark:
-
- - [x] Dashboard for visualization of search-data at runtime via streamlit (Progress-Board)
-
-
-
-
-
-v3.3.0 :heavy_check_mark:
-
- - [x] Early stopping
- - [x] Shared memory dictionary between processes with the same objective function
-
-
-
-
-
-v4.0.0 :heavy_check_mark:
-
- - [x] small adjustments to API
- - [x] move optimization strategies into sub-module "optimizers"
- - [x] preparation for future add ons (long-term-memory, meta-learn, ...) from separate repositories
- - [x] separate progress board into separate repository
-
-
-
-
-
-v4.1.0 :heavy_check_mark:
-
- - [x] add python 3.9 to testing
- - [x] add pass_through-parameter
- - [x] add v1 GFO optimization algorithms
-
-
-
-
-
-v4.2.0 :heavy_check_mark:
-
- - [x] add callbacks-parameter
- - [x] add catch-parameter
- - [x] add option to add eval- and iter- times to search-data
-
-
-
-
-
-v4.3.0 :heavy_check_mark:
-
- - [x] add new features from GFO
- - [x] add Spiral Optimization
- - [x] add Lipschitz Optimizer
- - [x] add DIRECT Optimizer
- - [x] print the random seed for reproducibility
-
-
-
-
-
-v4.4.0 :heavy_check_mark:
-
- - [x] add Optimization-Strategies
- - [x] redesign progress-bar
-
-
-
-
-
-v4.5.0 :heavy_check_mark:
-
- - [x] add early stopping feature to custom optimization strategies
- - [x] display additional outputs from objective-function in results in command-line
- - [x] add type hints to hyperactive-api
-
-
-
-
-
-v4.6.0 :heavy_check_mark:
-
- - [x] add support for constrained optimization
-
-
-
-
-
-v4.7.0 :heavy_check_mark:
-
- - [x] add Genetic algorithm optimizer
- - [x] add Differential evolution optimizer
-
-
-
-
-
-v4.8.0 :heavy_check_mark:
-
- - [x] add support for numpy v2
- - [x] add support for pandas v2
- - [x] add support for python 3.12
- - [x] transfer setup.py to pyproject.toml
- - [x] change project structure to src-layout
-
-
-
-
-
-v4.9.0
-
- - [ ] add sklearn integration
-
-
-
-
-
-
-
-
-Future releases
-
- - [ ] new optimization algorithms from [Gradient-Free-Optimizers](https://github.com/SimonBlanke/Gradient-Free-Optimizers) will always be added to Hyperactive
- - [ ] add "prune_search_space"-method to custom optimization strategy class
-
-
-
@@ -1064,10 +342,15 @@ Reduce the search space size to resolve this error.
-This is because you have classes and/or non-top-level objects in the search space. Pickle (used by multiprocessing) cannot serialize them. Setting distribution to "joblib" or "pathos" may fix this problem:
-```python
-hyper = Hyperactive(distribution="joblib")
-```
+This typically means your search space or parameter suggestions include non-serializable
+objects (e.g., classes, bound methods, lambdas, local functions, locks). Ensure that all
+values in `search_space`/`param_space` are plain Python/scientific types such as ints,
+floats, strings, lists/tuples, or numpy arrays. Avoid closures and non-top-level callables
+in parameter values.
+
+Hyperactive v5 does not expose a global “distribution” switch. If you parallelize outside
+Hyperactive (e.g., with joblib/dask/ray), choose an appropriate backend and make sure the
+objective and arguments are picklable for process-based backends.
@@ -1098,8 +381,9 @@ warnings.warn = warn
-This warning occurs because Hyperactive needs more initial positions to choose from to generate a population for the optimization algorithm:
-The number of initial positions is determined by the `initialize`-parameter in the `add_search`-method.
+This warning occurs because the optimizer needs more initial positions to generate a
+population for the search. In v5, initial positions are controlled via the optimizer’s
+`initialize` parameter.
```python
# This is how it looks per default
initialize = {"grid": 4, "random": 2, "vertices": 4}