Skip to content

Commit

Permalink
improved imports and related error message
Browse files Browse the repository at this point in the history
  • Loading branch information
benvanwerkhoven committed Sep 10, 2021
1 parent 3a98dd7 commit 094322d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel_tuner/strategies/bayes_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import itertools
import warnings
import time
from typing import Tuple

import numpy as np
from scipy.stats import norm

# BO imports
try:
from typing import Tuple
from scipy.stats import norm
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import ConstantKernel, RBF, Matern
from sklearn.exceptions import ConvergenceWarning
Expand Down Expand Up @@ -94,7 +94,7 @@ def tune(runner, kernel_options, device_options, tuning_options):
max_fevals = tuning_options.strategy_options.get("max_fevals", 100)
prune_parameterspace = tuning_options.strategy_options.get("pruneparameterspace", True)
if not bayes_opt_present:
raise ImportError("Error: optional dependencies for Bayesian Optimization not installed")
raise ImportError("Error: optional dependencies for Bayesian Optimization not installed, please install scikit-learn and scikit-optimize")

# epsilon for scaling should be the evenly spaced distance between the largest set of parameter options in an interval [0,1]
tune_params = tuning_options.tune_params
Expand Down

0 comments on commit 094322d

Please sign in to comment.