Monitor Scikit Optimize hyperparameter optimization in Neptune

Scikit Optimize Neptune integration


Integration with Scikit Optimize framework is introduced as a part of logging module so just need to have neptune-client and neptune-contrib installed.

pip install neptune-client neptune-contrib['monitoring']

Initialize Neptune and create an experiment

import neptune
neptune.create_experiment(name='skopt sweep')

Create NeptuneMonitor callback

Pass the experiment object as first argument.


To be able to log information after the .fit() method finishes remember to pass close_after_train=False

import neptunecontrib.monitoring.skopt as sk_utils
neptune_monitor = sk_utils.NeptuneMonitor()

Pass neptune_monitor to skopt.forest_minimize or others

It will monitor the metrics and parameters checked at each run.

results = skopt.forest_minimize(objective, space, callback=[neptune_monitor],
                                base_estimator='ET', n_calls=100, n_random_starts=10)

Log all results

It will log the following things to Neptune: * best score * best parameters * plot_convergence figure * plot_evaluations figure * plot_objective figure


Monitor your Scikit Optimize training in Neptune

Now you can watch your Scikit Optimize hyperparameter optimization in Neptune!

Check out this example experiment.

Scikit Optimize monitoring in Neptune