From 63d60a0e389dccf38ead1a235cba68ab439f2a7a Mon Sep 17 00:00:00 2001 From: dongjiao Date: Thu, 20 Mar 2025 14:45:47 +0800 Subject: [PATCH] fix bug cause scikit-learn-1.2 rename the parameter 'base_estimator' to 'estimator'. --- ...-rename-the-parameter-base_estimator.patch | 26 +++++++++++++++++++ atune.spec | 7 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 0002-scikit-learn-1.2-rename-the-parameter-base_estimator.patch diff --git a/0002-scikit-learn-1.2-rename-the-parameter-base_estimator.patch b/0002-scikit-learn-1.2-rename-the-parameter-base_estimator.patch new file mode 100644 index 0000000..5c89f6e --- /dev/null +++ b/0002-scikit-learn-1.2-rename-the-parameter-base_estimator.patch @@ -0,0 +1,26 @@ +From b274e3e2455df84a95ed34acd118dd72c5e14313 Mon Sep 17 00:00:00 2001 +From: dongjiao +Date: Tue, 11 Mar 2025 11:09:07 +0800 +Subject: [PATCH] scikit-learn-1.2 rename the parameter 'base_estimator' to + 'estimator'. + +--- + analysis/optimizer/weighted_ensemble_feature_selector.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/analysis/optimizer/weighted_ensemble_feature_selector.py b/analysis/optimizer/weighted_ensemble_feature_selector.py +index cb39561..4137fe4 100644 +--- a/analysis/optimizer/weighted_ensemble_feature_selector.py ++++ b/analysis/optimizer/weighted_ensemble_feature_selector.py +@@ -86,7 +86,7 @@ class WeightedEnsembleFeatureSelector: + graboo = GradientBoostingRegressor(n_estimators=10000, learning_rate=0.1) + adb = AdaBoostRegressor(DecisionTreeRegressor(max_depth=16), + n_estimators=10000, random_state=0) +- bag = BaggingRegressor(base_estimator=ExtraTreeRegressor(max_depth=16), ++ bag = BaggingRegressor(estimator=ExtraTreeRegressor(max_depth=16), + n_estimators=10000, random_state=0, n_jobs=-1) + self._regressors = [dtree, ranfor, graboo, adb, bag] + self._ensemble_model = Ridge(alpha=10, max_iter=1000000) +-- +2.43.0 + diff --git a/atune.spec b/atune.spec index f639b77..737d173 100755 --- a/atune.spec +++ b/atune.spec @@ -3,7 +3,7 @@ Summary: AI auto tuning system Name: atune Version: 1.2.0 -Release: 3 +Release: 4 License: MulanPSL-2.0 URL: https://gitee.com/openeuler/A-Tune Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz @@ -15,6 +15,7 @@ Patch9003: adjust-the-startup-sequence-of-atune-rest.patch Patch9004: import-os-for-app.py.patch Patch9005: adapt-sqlite-3.42-to-resolve-the-build-failure.patch Patch9006: 0001-fix-skopt.Optimizer-incompatible-with-numpy-1.24.patch +Patch9007: 0002-scikit-learn-1.2-rename-the-parameter-base_estimator.patch BuildRequires: rpm-build golang-bin procps-ng BuildRequires: sqlite >= 3.24.0 openssl @@ -92,6 +93,7 @@ atune restful api for manage atuned AI tuning system. %patch9004 -p1 %patch9005 -p1 %patch9006 -p1 +%patch9007 -p1 %build %make_build @@ -192,6 +194,9 @@ atune restful api for manage atuned AI tuning system. %exclude /etc/atuned/rest_certs %changelog +* Thu Mar 20 2025 dongjiao - 1.2.0-4 +- fix bug cause scikit-learn-1.2 rename the parameter 'base_estimator' to 'estimator'. + * Fri Dec 6 2024 zhangnan - 1.2.0-3 - fix skopt.Optimizer incompatible with numpy-1.24 -- Gitee