42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From 74a86e20d09cbe3bba0a776f4a1c72941267f7f5 Mon Sep 17 00:00:00 2001
|
|
From: huangbin <huangbin58@huawei.com>
|
|
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
|
|
|