From 0a38860dca2bbc8f355aeee0b31829fba572b0e8 Mon Sep 17 00:00:00 2001 From: markeryang Date: Thu, 27 Mar 2025 08:00:28 +0000 Subject: [PATCH 1/2] test_print --- 0001-test_print.patch | 33 +++++++++++++++++++++++++++++++++ atune.spec | 4 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-test_print.patch diff --git a/0001-test_print.patch b/0001-test_print.patch new file mode 100644 index 0000000..4e0438f --- /dev/null +++ b/0001-test_print.patch @@ -0,0 +1,33 @@ +From f5508754c06c69d4d308f66f385dc194030d3e0b Mon Sep 17 00:00:00 2001 +From: markeryang +Date: Thu, 27 Mar 2025 07:58:18 +0000 +Subject: [PATCH] test_print + +--- + analysis/optimizer/app_characterization.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/analysis/optimizer/app_characterization.py b/analysis/optimizer/app_characterization.py +index 80b6752..850a851 100644 +--- a/analysis/optimizer/app_characterization.py ++++ b/analysis/optimizer/app_characterization.py +@@ -226,7 +226,9 @@ class AppCharacterization(WorkloadCharacterization): + type_model_clf = joblib.load(type_model_path) + app_model_clf = joblib.load(app_model_path) + ++ print("unprocessed_data is" + data) + data = self.scaler.transform(data) ++ print("processed_data is" + data) + + if feature_selection: + type_feature = os.path.join(self.model_path, "type_feature.m") +@@ -290,4 +292,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.33.0 + diff --git a/atune.spec b/atune.spec index 4698289..281e6d3 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: 0001-test_print.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 -- Gitee From 78798bb69b95abb8b5548414d96d88a85e4386b1 Mon Sep 17 00:00:00 2001 From: markeryang Date: Fri, 28 Mar 2025 09:24:12 +0000 Subject: [PATCH 2/2] update 0001-test_print.patch. --- 0001-test_print.patch | 56 ++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/0001-test_print.patch b/0001-test_print.patch index 4e0438f..5d4f36a 100644 --- a/0001-test_print.patch +++ b/0001-test_print.patch @@ -1,33 +1,39 @@ -From f5508754c06c69d4d308f66f385dc194030d3e0b Mon Sep 17 00:00:00 2001 -From: markeryang -Date: Thu, 27 Mar 2025 07:58:18 +0000 -Subject: [PATCH] test_print +From 1d09b8e9c9b160e931e0c5c1c97934eab49d7d72 Mon Sep 17 00:00:00 2001 +From: Linux_zhang +Date: Fri, 28 Mar 2025 10:14:53 +0800 +Subject: [PATCH] debug --- - analysis/optimizer/app_characterization.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + Makefile | 2 +- + modules/server/profile/profile.go | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/analysis/optimizer/app_characterization.py b/analysis/optimizer/app_characterization.py -index 80b6752..850a851 100644 ---- a/analysis/optimizer/app_characterization.py -+++ b/analysis/optimizer/app_characterization.py -@@ -226,7 +226,9 @@ class AppCharacterization(WorkloadCharacterization): - type_model_clf = joblib.load(type_model_path) - app_model_clf = joblib.load(app_model_path) +diff --git a/Makefile b/Makefile +index cb1d16c..266ebb6 100755 +--- a/Makefile ++++ b/Makefile +@@ -13,7 +13,7 @@ ATUNEVERSION = $(VERSION)$(if $(SRCVERSION),($(SRCVERSION))) + SHELL = /bin/bash -+ print("unprocessed_data is" + data) - data = self.scaler.transform(data) -+ print("processed_data is" + data) + GOLDFLAGS += -X gitee.com/openeuler/A-Tune/common/config.Version=$(ATUNEVERSION) +-GOFLAGS = -ldflags '-s -w -extldflags "-static" -extldflags "-zrelro" -extldflags "-znow" -extldflags "-ftrapv" $(GOLDFLAGS)' ++GOFLAGS = -ldflags '-s -w -extldflags "-static" -extldflags "-zrelro" -extldflags "-znow" -extldflags "-ftrapv" $(GOLDFLAGS)' -gcflags "-N -l" - if feature_selection: - type_feature = os.path.join(self.model_path, "type_feature.m") -@@ -290,4 +292,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 + CERT_PATH=$(DESTDIR)/etc/atuned + GRPC_CERT_PATH=$(CERT_PATH)/grpc_certs +diff --git a/modules/server/profile/profile.go b/modules/server/profile/profile.go +index 2ce0a47..9cf35ea 100644 +--- a/modules/server/profile/profile.go ++++ b/modules/server/profile/profile.go +@@ -155,7 +155,7 @@ func (p *ClassifyPostBody) Post() (*RespClassify, error) { + + defer response.Body.Close() + if response.StatusCode != 200 { +- return nil, fmt.Errorf("online learning failed") ++ return nil, fmt.Errorf("online learning failed xxx-zhangrf : response.StatusCode %d , %s",response.StatusCode,url) + } + resBody, err := ioutil.ReadAll(response.Body) + if err != nil { -- 2.33.0 -- Gitee