From 5f7a4001cd8ac70342ef3cfc954e6542d4b2deb2 Mon Sep 17 00:00:00 2001 From: huangbin Date: Sat, 9 Nov 2024 16:54:50 +0800 Subject: [PATCH] optim: remove unuse code. --- 0003-remove-unuse-code.patch | 41 ++++++++++++++++++++++++++++++++++++ gala-anteater.spec | 6 +++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0003-remove-unuse-code.patch diff --git a/0003-remove-unuse-code.patch b/0003-remove-unuse-code.patch new file mode 100644 index 0000000..253965c --- /dev/null +++ b/0003-remove-unuse-code.patch @@ -0,0 +1,41 @@ +From 74a86e20d09cbe3bba0a776f4a1c72941267f7f5 Mon Sep 17 00:00:00 2001 +From: huangbin +Date: Sat, 9 Nov 2024 16:36:16 +0800 +Subject: [PATCH] remove-unuse-code + +--- + .../model/rca/rca_graph/prune_bidirected_graph.py | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/anteater/model/rca/rca_graph/prune_bidirected_graph.py b/anteater/model/rca/rca_graph/prune_bidirected_graph.py +index 96f3e0b..57c4c8c 100644 +--- a/anteater/model/rca/rca_graph/prune_bidirected_graph.py ++++ b/anteater/model/rca/rca_graph/prune_bidirected_graph.py +@@ -12,7 +12,6 @@ import os + import json + from typing import Dict + import networkx as nx +-import matplotlib.pyplot as plt + from anteater.model.rca.rca_graph.utils import create_meta_graph + from anteater.utils.log import logger + +@@ -126,16 +125,3 @@ class PrunedMetaGraph: + + return self._meta_graph + +-def plot_network(graph, front_end_metric=None): +- # 绘制图 +- pos = nx.circular_layout(graph) # 圆形布局,起到美化作用 +- color_values = [] +- for node in graph.nodes(): +- if node == front_end_metric: +- color_values.append(1.0) +- else: +- color_values.append(0.25) +- nx.draw(graph, pos, with_labels=True, font_weight="bold", node_color=color_values, cmap=plt.get_cmap('viridis')) +- plt.title("DiGraph") +- plt.show() +- +-- +2.43.0 + diff --git a/gala-anteater.spec b/gala-anteater.spec index 2918f2c..a6a72dc 100644 --- a/gala-anteater.spec +++ b/gala-anteater.spec @@ -2,7 +2,7 @@ Name: gala-anteater Version: 1.2.1 -Release: 2 +Release: 3 Summary: A time-series anomaly detection platform for operating system. License: MulanPSL2 URL: https://gitee.com/openeuler/gala-anteater @@ -13,6 +13,7 @@ Requires: python3-gala-anteater = %{version}-%{release} patch0: 0001-add-new-feature-slow-node-detection.patch patch1: 0002-configure-group-in-json.patch +patch2: 0003-remove-unuse-code.patch %description Abnormal detection module for A-Ops project @@ -80,6 +81,9 @@ fi %changelog +* Sat Nov 9 2024 huangbin - 1.2.1-3 +- remove unuse code plot network. + * Fri Nov 8 2024 huangbin - 1.2.1-2 - Add new feature slow node detection.