From 3f9f29ba4ef752ce87e74960116e0f0b9d1d63d0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 10 Dec 2019 16:10:51 +0100 Subject: [PATCH] Fix Flake8 import error --- freqtrade/optimize/hyperopt.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index c84240934..a5be478bf 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -21,12 +21,6 @@ from joblib import (Parallel, cpu_count, delayed, dump, load, wrap_non_picklable_objects) from pandas import DataFrame -# Suppress scikit-learn FutureWarnings from skopt -with warnings.catch_warnings(): - warnings.filterwarnings("ignore", category=FutureWarning) - from skopt import Optimizer - from skopt.space import Dimension - from freqtrade.data.history import get_timeframe, trim_dataframe from freqtrade.misc import plural, round_dict from freqtrade.optimize.backtesting import Backtesting @@ -36,6 +30,13 @@ from freqtrade.optimize.hyperopt_loss_interface import IHyperOptLoss # noqa: F4 from freqtrade.resolvers.hyperopt_resolver import (HyperOptLossResolver, HyperOptResolver) +# Suppress scikit-learn FutureWarnings from skopt +with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=FutureWarning) + from skopt import Optimizer + from skopt.space import Dimension + + logger = logging.getLogger(__name__)