diff --git a/0003-fix-atune-adm-analyse-failed-problem.patch b/0003-fix-atune-adm-analyse-failed-problem.patch new file mode 100644 index 0000000000000000000000000000000000000000..c7b2ece76fec77102f881750ec19e2d21ba43838 --- /dev/null +++ b/0003-fix-atune-adm-analyse-failed-problem.patch @@ -0,0 +1,54 @@ +From 2cc1896225cec667893068a3be5d8e7d09043af5 Mon Sep 17 00:00:00 2001 +From: Pshysimon +Date: Sat, 12 Apr 2025 16:44:11 +0800 +Subject: [PATCH] fix atune-adm analyse failed problem + +--- + analysis/optimizer/app_characterization.py | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/analysis/optimizer/app_characterization.py b/analysis/optimizer/app_characterization.py +index 80b6752..738320f 100644 +--- a/analysis/optimizer/app_characterization.py ++++ b/analysis/optimizer/app_characterization.py +@@ -202,16 +202,9 @@ class AppCharacterization(WorkloadCharacterization): + :param feature_selection: whether to perform feature extraction + :param consider_perf: whether to consider perf indicators + """ +- if consider_perf == None: +- consider_perf = self.consider_perf +- +- data_features = self.get_consider_perf(consider_perf) +- + cpu_exist, mem_exist, net_quality_exist, net_io_exist, disk_io_exist = self.bottleneck.search_bottleneck(data) + bottleneck_binary = (int(cpu_exist) << 4) | (int(mem_exist) << 3) | (int(net_quality_exist) << 2) | (int(net_io_exist) << 1) | int(disk_io_exist) + +- data = data[data_features] +- + tencoder_path = os.path.join(self.model_path, "tencoder.pkl") + aencoder_path = os.path.join(self.model_path, "aencoder.pkl") + scaler_path = os.path.join(self.model_path, "scaler.pkl") +@@ -226,6 +219,13 @@ class AppCharacterization(WorkloadCharacterization): + type_model_clf = joblib.load(type_model_path) + app_model_clf = joblib.load(app_model_path) + ++ if consider_perf is None: ++ consider_perf = (len(self.scaler.mean_) == len(data.columns)) ++ ++ data_features = self.get_consider_perf(consider_perf) ++ ++ data = data[data_features] ++ + data = self.scaler.transform(data) + + if feature_selection: +@@ -290,4 +290,4 @@ class AppCharacterization(WorkloadCharacterization): + confidence = prediction[1] / len(result) + if confidence > 0.5: + return bottleneck_binary, prediction[0], confidence +- return bottleneck_binary, "default", confidence +\ No newline at end of file ++ return bottleneck_binary, "default", confidence +-- +2.27.0 + diff --git a/atune.spec b/atune.spec index a2b5f8c7dbad5c6c55c2d81e5a0e99f17375f2a6..1f420db30154ac121242142ed717cb0bdf8afa0e 100755 --- a/atune.spec +++ b/atune.spec @@ -3,7 +3,7 @@ Summary: AI auto tuning system Name: atune Version: 1.2.0 -Release: 4 +Release: 5 License: MulanPSL-2.0 URL: https://gitee.com/openeuler/A-Tune Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz @@ -16,6 +16,7 @@ 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 +Patch9008: 0003-fix-atune-adm-analyse-failed-problem.patch BuildRequires: rpm-build golang-bin procps-ng BuildRequires: sqlite >= 3.24.0 openssl @@ -94,6 +95,7 @@ atune restful api for manage atuned AI tuning system. %patch9005 -p1 %patch9006 -p1 %patch9007 -p1 +%patch9008 -p1 %build %make_build @@ -194,6 +196,9 @@ atune restful api for manage atuned AI tuning system. %exclude /etc/atuned/rest_certs %changelog +* Mon Apr 21 2025 caixiaomeng - 1.2.0-5 +- fix atune-adm analyse failed problem + * Thu Mar 20 2025 dongjiao - 1.2.0-4 - fix bug cause scikit-learn-1.2 rename the parameter 'base_estimator' to 'estimator'.