From 27a36bfb40dc651e526d028040baaf2265d06869 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jul 2023 15:30:58 +0200 Subject: [PATCH] Bump lightgbm from 3.3.5 to 4.0.0 (#8923) * Bump lightgbm from 3.3.5 to 4.0.0 Bumps [lightgbm](https://github.com/microsoft/LightGBM) from 3.3.5 to 4.0.0. - [Release notes](https://github.com/microsoft/LightGBM/releases) - [Commits](https://github.com/microsoft/LightGBM/compare/v3.3.5...v4.0.0) --- updated-dependencies: - dependency-name: lightgbm dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * fix: ensure freqai lightgbm variants conform to v4.0.0 * remove random file --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: robcaulk --- freqtrade/freqai/prediction_models/LightGBMClassifier.py | 5 ++--- freqtrade/freqai/prediction_models/LightGBMRegressor.py | 2 +- .../freqai/prediction_models/LightGBMRegressorMultiTarget.py | 4 ++-- requirements-freqai.txt | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/freqtrade/freqai/prediction_models/LightGBMClassifier.py b/freqtrade/freqai/prediction_models/LightGBMClassifier.py index 45f3a31d0..4c481adff 100644 --- a/freqtrade/freqai/prediction_models/LightGBMClassifier.py +++ b/freqtrade/freqai/prediction_models/LightGBMClassifier.py @@ -32,8 +32,8 @@ class LightGBMClassifier(BaseClassifierModel): eval_set = None test_weights = None else: - eval_set = (data_dictionary["test_features"].to_numpy(), - data_dictionary["test_labels"].to_numpy()[:, 0]) + eval_set = [(data_dictionary["test_features"].to_numpy(), + data_dictionary["test_labels"].to_numpy()[:, 0])] test_weights = data_dictionary["test_weights"] X = data_dictionary["train_features"].to_numpy() y = data_dictionary["train_labels"].to_numpy()[:, 0] @@ -42,7 +42,6 @@ class LightGBMClassifier(BaseClassifierModel): init_model = self.get_init_model(dk.pair) model = LGBMClassifier(**self.model_training_parameters) - model.fit(X=X, y=y, eval_set=eval_set, sample_weight=train_weights, eval_sample_weight=[test_weights], init_model=init_model) diff --git a/freqtrade/freqai/prediction_models/LightGBMRegressor.py b/freqtrade/freqai/prediction_models/LightGBMRegressor.py index 3d1c30ed3..15849f446 100644 --- a/freqtrade/freqai/prediction_models/LightGBMRegressor.py +++ b/freqtrade/freqai/prediction_models/LightGBMRegressor.py @@ -32,7 +32,7 @@ class LightGBMRegressor(BaseRegressionModel): eval_set = None eval_weights = None else: - eval_set = (data_dictionary["test_features"], data_dictionary["test_labels"]) + eval_set = [(data_dictionary["test_features"], data_dictionary["test_labels"])] eval_weights = data_dictionary["test_weights"] X = data_dictionary["train_features"] y = data_dictionary["train_labels"] diff --git a/freqtrade/freqai/prediction_models/LightGBMRegressorMultiTarget.py b/freqtrade/freqai/prediction_models/LightGBMRegressorMultiTarget.py index 663a611f0..5827dcefe 100644 --- a/freqtrade/freqai/prediction_models/LightGBMRegressorMultiTarget.py +++ b/freqtrade/freqai/prediction_models/LightGBMRegressorMultiTarget.py @@ -42,10 +42,10 @@ class LightGBMRegressorMultiTarget(BaseRegressionModel): eval_weights = [data_dictionary["test_weights"]] eval_sets = [(None, None)] * data_dictionary['test_labels'].shape[1] # type: ignore for i in range(data_dictionary['test_labels'].shape[1]): - eval_sets[i] = ( # type: ignore + eval_sets[i] = [( # type: ignore data_dictionary["test_features"], data_dictionary["test_labels"].iloc[:, i] - ) + )] init_model = self.get_init_model(dk.pair) if init_model: diff --git a/requirements-freqai.txt b/requirements-freqai.txt index ceb5488a6..325b92544 100644 --- a/requirements-freqai.txt +++ b/requirements-freqai.txt @@ -6,7 +6,7 @@ scikit-learn==1.1.3 joblib==1.3.1 catboost==1.2; 'arm' not in platform_machine -lightgbm==3.3.5 +lightgbm==4.0.0 xgboost==1.7.6 tensorboard==2.13.0 datasieve==0.1.7