diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index e7b30198f..e52cb8faf 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -7,6 +7,7 @@ This module contains the hyperopt logic import locale import logging import sys +import warnings from collections import OrderedDict from operator import itemgetter from pathlib import Path @@ -19,8 +20,6 @@ from colorama import init as colorama_init from joblib import (Parallel, cpu_count, delayed, dump, load, wrap_non_picklable_objects) from pandas import DataFrame -from skopt import Optimizer -from skopt.space import Dimension from freqtrade import OperationalException from freqtrade.data.history import get_timeframe, trim_dataframe @@ -32,6 +31,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__) diff --git a/requirements-hyperopt.txt b/requirements-hyperopt.txt index 96a22b42e..2317cdf3e 100644 --- a/requirements-hyperopt.txt +++ b/requirements-hyperopt.txt @@ -3,7 +3,7 @@ # Required for hyperopt scipy==1.3.3 -scikit-learn==0.21.3 +scikit-learn==0.22 scikit-optimize==0.5.2 filelock==3.0.12 joblib==0.14.0