!157 修复scikit-learn-1.4导致的接口不兼容,atune-tuning 功能失败问题

From: @tong_1001 
Reviewed-by: @hubin95 
Signed-off-by: @hubin95
This commit is contained in:
openeuler-ci-bot 2025-03-21 02:19:42 +00:00 committed by Gitee
commit c9f06f282a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From b274e3e2455df84a95ed34acd118dd72c5e14313 Mon Sep 17 00:00:00 2001
From: dongjiao <dongjiao@kylinos.cn>
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

View File

@ -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 <dongjiao@kylinos.cn> - 1.2.0-4
- fix bug cause scikit-learn-1.2 rename the parameter 'base_estimator' to 'estimator'.
* Mon Jul 29 2024 dongjiao <dongjiao@kylinos.cn> - 1.2.0-3
- fix skopt.Optimizer incompatible with numpy-1.24