fix atune-adm analyse failed problem
(cherry picked from commit 8402ae3b7f611fd9e32226a866c7c3c0702e5287)
This commit is contained in:
parent
c9f06f282a
commit
cdebc92897
54
0003-fix-atune-adm-analyse-failed-problem.patch
Normal file
54
0003-fix-atune-adm-analyse-failed-problem.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 2cc1896225cec667893068a3be5d8e7d09043af5 Mon Sep 17 00:00:00 2001
|
||||
From: Pshysimon <caixiaomeng2@huawei.com>
|
||||
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
|
||||
|
||||
@ -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 <caixiaomeng2@huawei.com> - 1.2.0-5
|
||||
- fix atune-adm analyse failed problem
|
||||
|
||||
* 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'.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user