Browse Source

sort graph_names for multi_graph in offline_debugger

pull/1329/head
maning202007 4 years ago
parent
commit
e7bfd4f499
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