Commit 0950a7b
authored
[ENH] allowing old function API to be passed as experiment (#152)
From a user perspective, the ability to define ad-hoc functions via the
old `my_callable(opt)` notation was quite nice, and imo should be
retained for compabitility with user code, and due to quick
specification.
This PR adds
* the ability to pass functions of the old `my_callable(opt)` signature
to any optimizer
* a `FunctionExperiment` which adapts functions to the `BaseExperiment`
API. This experiment is public, since it is also useful when a user
already has a function or callable to adapt.
The feature also requires to relax the `BaseExperiment` contract, and
allow passing of `params` with unknown keys, or arbitrary keys, or keys
not known in advance.1 parent b04e0a1 commit 0950a7b
7 files changed
Lines changed: 1942 additions & 10 deletions
File tree
- examples
- extension_templates
- src/hyperactive
- base
- tests
- experiment
- tests
0 commit comments