# Create Neptune Callback
import neptunecontrib.monitoring.skopt as skopt_utils

neptune_callback = skopt_utils.NeptuneCallback()

# Run the skopt minimize function with the Neptune Callback
results = skopt.forest_minimize(objective,
                                space,
                                n_calls=25,
                                n_random_starts=10,
                                callback=[neptune_callback])

## Step 4: Log best parameter configuration, best score and diagnostic plots

skopt_utils.log_results(results)

## Step 5: Stop logging and Explore results in the Neptune UI

# tests

exp = neptune.get_experiment()

neptune.stop()

# tests

all_logs = exp.get_logs()

## check logs
correct_logs = [
Esempio n. 2
0
# Create Neptune Callback
import neptunecontrib.monitoring.skopt as skopt_utils

neptune_callback = skopt_utils.NeptuneCallback()

# Run the skopt minimize function with the Neptune Callback
results = skopt.forest_minimize(objective,
                                space,
                                n_calls=25,
                                n_random_starts=10,
                                callback=[neptune_callback])

## Step 3: Log best parameter configuration, best score and diagnostic plots

skopt_utils.log_results(results)

## Step 4: Stop logging and Explore results in the Neptune UI

neptune.stop()

# Logging BayesSearchCV

## Prepare the data and initialize BayesSearchCV optimizer

from skopt import BayesSearchCV
from skopt.space import Real, Categorical, Integer

from sklearn.datasets import load_iris
from sklearn.svm import SVC
from sklearn.model_selection import train_test_split