Skopt

class neptunecontrib.monitoring.skopt.NeptuneMonitor(experiment=None)[source]

Bases: object

Logs hyperparameter optimization process to Neptune.

Examples

Initialize NeptuneMonitor:

import neptune
import neptunecontrib.monitoring.skopt as sk_utils

neptune.init(project_qualified_name='USER_NAME/PROJECT_NAME')

monitor = sk_utils.NeptuneMonitor()

Run skopt training passing monitor as a a callback:

...
results = skopt.forest_minimize(objective, space, callback=[monitor],
                    base_estimator='ET', n_calls=100, n_random_starts=10)
neptunecontrib.monitoring.skopt.send_best_parameters(results, experiment=None)[source]

Logs best_parameters list to neptune.

Text channel best_parameters is created and a list of tuples (name, value) of best paramters is logged to neptune.

Parameters:
  • results ('scipy.optimize.OptimizeResult') – Results object that is typically an output of the function like skopt.forest_minimize(…)
  • experiment (neptune.experiments.Experiment) – Neptune experiment. Default is None.

Examples

Run skopt training:

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

Send best parameters to neptune:

import neptune
import neptunecontrib.monitoring.skopt as sk_utils

neptune.init(project_qualified_name='USER_NAME/PROJECT_NAME')

sk_monitor.send_best_parameters(results)
neptunecontrib.monitoring.skopt.send_plot_convergence(results, experiment=None, channel_name='convergence')[source]

Logs skopt plot_convergence figure to neptune.

Image channel convergence is created and the output of the plot_convergence function is first covented to neptune.Image and then sent to neptune.

Parameters:
  • results ('scipy.optimize.OptimizeResult') – Results object that is typically an output of the function like skopt.forest_minimize(…)
  • experiment (neptune.experiments.Experiment) – Neptune experiment. Default is None.

Examples

Run skopt training:

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

Send skopt plot_convergence figure to neptune:

import neptune
import neptunecontrib.monitoring.skopt as sk_utils

neptune.init(project_qualified_name='USER_NAME/PROJECT_NAME')

sk_monitor.send_plot_convergence(results)
neptunecontrib.monitoring.skopt.send_plot_evaluations(results, experiment=None, channel_name='evaluations')[source]

Logs skopt plot_evaluations figure to neptune.

Image channel evaluations is created and the output of the plot_evaluations function is first covented to neptune.Image and then sent to neptune.

Parameters:
  • results ('scipy.optimize.OptimizeResult') – Results object that is typically an output of the function like skopt.forest_minimize(…)
  • experiment (neptune.experiments.Experiment) – Neptune experiment. Default is None.

Examples

Run skopt training:

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

Send skopt plot_evaluations figure to neptune:

import neptune
import neptunecontrib.monitoring.skopt as sk_utils

neptune.init(project_qualified_name='USER_NAME/PROJECT_NAME')

sk_monitor.send_plot_evaluations(results)
neptunecontrib.monitoring.skopt.send_plot_objective(results, experiment=None, channel_name='objective')[source]

Logs skopt plot_objective figure to neptune.

Image channel objective is created and the output of the plot_objective function is first covented to neptune.Image and then sent to neptune.

Parameters:
  • results ('scipy.optimize.OptimizeResult') – Results object that is typically an output of the function like skopt.forest_minimize(…)
  • experiment (neptune.experiments.Experiment) – Neptune experiment. Default is None.

Examples

Run skopt training:

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

Send skopt plot_objective figure to neptune:

import neptune
import neptunecontrib.monitoring.skopt as sk_utils

neptune.init(project_qualified_name='USER_NAME/PROJECT_NAME')

sk_monitor.send_plot_objective(results)
neptunecontrib.monitoring.skopt.send_runs(results, experiment=None)[source]

Logs runs results and parameters to neptune.

Text channel hyperparameter_search_score is created and a list of tuples (name, value) of best paramters is logged to neptune.

Parameters:
  • results ('scipy.optimize.OptimizeResult') – Results object that is typically an output of the function like skopt.forest_minimize(…)
  • experiment (neptune.experiments.Experiment) – Neptune experiment. Default is None.

Examples

Run skopt training:

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

Send best parameters to neptune:

import neptune
import neptunecontrib.monitoring.skopt as sk_utils

neptune.init(project_qualified_name='USER_NAME/PROJECT_NAME')

sk_monitor.send_best_parameters(results)