Browse Source

!1329 Sort graph_names for multi_graph in offline_debugger

From: @maning202007
Reviewed-by: @yelihua,@liuchongming74
Signed-off-by: @liuchongming74
pull/1329/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
c967c25019
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindinsight/debugger/stream_handler/device_handler.py

+ 4
- 0
mindinsight/debugger/stream_handler/device_handler.py View File

@@ -116,6 +116,10 @@ class DeviceHandler(StreamHandlerBase):
"""
for rank_id, graph_info in graphs.items():
graph_names = list(graph_info)
if len(graph_names) > 1:
# if more than one graphs in a device, sort them
# by the number following the last "_" in the graph_name
graph_names = sorted(graph_names, key=lambda x: x.split("_")[-1])
self._rank_info[rank_id].graph_names = graph_names

def get(self, filter_condition=None):


Loading…
Cancel
Save