You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hyperactive features a collection of optimization algorithms that can be used for a variety of optimization problems. The following table shows examples of its capabilities:
|[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. |
267
-
| [Search-Data-Explorer](https://github.com/SimonBlanke/search-data-explorer) | Visualize search-data with plotly inside a streamlit dashboard.
268
-
269
-
270
-
271
-
<br>
272
-
273
-
## FAQ
274
-
275
-
#### Known Errors + Solutions
276
-
277
-
<details>
278
-
<summary><b> Read this before opening a bug-issue </b></summary>
279
-
280
-
<br>
281
-
282
-
- <b>Are you sure the bug is located in Hyperactive? </b>
283
-
284
-
The error might be located in the optimization-backend.
285
-
Look at the error message from the command line. <b>If</b> one of the last messages look like this:
286
-
- File "/.../gradient_free_optimizers/...", line ...
<br>Otherwise</b> you can post the bug report in Hyperactive
292
-
293
-
- <b>Do you have the correct Hyperactive version? </b>
294
-
295
-
Every major version update (e.g. v2.2 -> v3.0) the API of Hyperactive changes.
296
-
Check which version of Hyperactive you have. If your major version is older you have two options:
297
-
298
-
<b>Recommended:</b> You could just update your Hyperactive version with:
299
-
```bash
300
-
pip install hyperactive --upgrade
301
-
```
302
-
This way you can use all the new documentation and examples from the current repository.
303
-
304
-
Or you could continue using the old version and use an old repository branch as documentation.
305
-
You can do that by selecting the corresponding branch. (top right of the repository. The default is "main")
306
-
So if your major version is older (e.g. v2.1.0) you can select the 2.x.x branch to get the old repository for that version.
307
-
308
-
- <b>Provide example code for error reproduction </b>
309
-
To understand and fix the issue I need an example code to reproduce the error.
310
-
I must be able to just copy the code into a py-file and execute it to reproduce the error.
311
-
312
-
</details>
313
-
314
-
315
-
<details>
316
-
<summary> MemoryError: Unable to allocate ... for an array with shape (...) </summary>
317
-
318
-
<br>
319
-
320
-
This is expected of the current implementation of smb-optimizers. For all Sequential model based algorithms you have to keep your eyes on the search space size:
321
-
```python
322
-
search_space_size =1
323
-
for value_ in search_space.values():
324
-
search_space_size *=len(value_)
325
-
326
-
print("search_space_size", search_space_size)
327
-
```
328
-
Reduce the search space size to resolve this error.
This typically means your search space or parameter suggestions include non-serializable
339
-
objects (e.g., classes, bound methods, lambdas, local functions, locks). Ensure that all
340
-
values in `search_space`/`param_space` are plain Python/scientific types such as ints,
341
-
floats, strings, lists/tuples, or numpy arrays. Avoid closures and non-top-level callables
342
-
in parameter values.
343
-
344
-
Hyperactive v5 does not expose a global “distribution” switch. If you parallelize outside
345
-
Hyperactive (e.g., with joblib/dask/ray), choose an appropriate backend and make sure the
346
-
objective and arguments are picklable for process-based backends.
347
-
348
-
</details>
349
-
350
-
351
-
<details>
352
-
<summary> Command line full of warnings </summary>
353
-
354
-
<br>
355
-
356
-
Very often warnings from sklearn or numpy. Those warnings do not correlate with bad performance from Hyperactive. Your code will most likely run fine. Those warnings are very difficult to silence.
357
-
358
-
It should help to put this at the very top of your script:
359
-
```python
360
-
defwarn(*args, **kwargs):
361
-
pass
362
-
363
-
364
-
import warnings
365
-
366
-
warnings.warn = warn
367
-
```
368
-
369
-
</details>
370
164
371
165
372
-
<details>
373
-
<summary> Warning: Not enough initial positions for population size </summary>
374
-
375
-
<br>
376
-
377
-
This warning occurs because the optimizer needs more initial positions to generate a
378
-
population for the search. In v5, initial positions are controlled via the optimizer’s
0 commit comments