From 25447329a01bc2e354aee0f7d5b00ee7d65aacc9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2019 07:25:44 +0000 Subject: [PATCH 1/3] Bump scikit-learn from 0.21.3 to 0.22 Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 0.21.3 to 0.22. - [Release notes](https://github.com/scikit-learn/scikit-learn/releases) - [Commits](https://github.com/scikit-learn/scikit-learn/compare/0.21.3...0.22) Signed-off-by: dependabot-preview[bot] --- requirements-hyperopt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 3448f86263363c26ba8cbc5c3ac9fcf3fff80bea Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Tue, 10 Dec 2019 15:45:10 +0300 Subject: [PATCH 2/3] Suppress scikit-learn FutureWarnings from skopt imports --- freqtrade/optimize/hyperopt.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index a7b0e2bf6..c84240934 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,12 @@ 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 + +# 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 3f9f29ba4ef752ce87e74960116e0f0b9d1d63d0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 10 Dec 2019 16:10:51 +0100 Subject: [PATCH 3/3] 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__)