Getting Started

In order to use this library, you need to have a working installation of f3dasm. You can get the installation instructions from here.

Then, you can install this optimization extension library using pip:

pip install f3dasm_optimize

Upon installing the library in your environment, when accessing the f3dasm library, the optimization extension will be automatically loaded when you look at the available optimizers:

import f3dasm

print(f3dasm.optimization.OPTIMIZERS)
>>> ['RandomSearch', 'CG', 'LBFGSB', 'NelderMead']

Wait a second .. these are only the optimizers that can be found in the standard f3dasm library! What happened to the new optimizers?

Well, the new optimizers are not loaded by default, because you might not have the required dependencies installed. In order to load the new optimizers, you need to explicitly have the dependencies for the optimizers installed in your environment.

For example, if you want to use the TPESampler optimizer from optuna, you need to have optuna installed in your environment:

pip install optuna

Then, when you inspect the optimizers, the list will be updated:

import f3dasm

print(f3dasm.optimization.OPTIMIZERS)
>>> ['RandomSearch', 'CG', 'LBFGSB', 'NelderMead', 'TPESampler']

Now, you can use the new optimizers in your code:

experimentdata.optimize(optimizer='TPESampler', data_generator='Ackley', iterations=100)

Note

Some optimizers are not compatible with particular versions of Python or operating systems. Consult the documentation of the optimizer you want to use to see if there are any other requirements that need to be met.

Happy optimizing!