Skip to content

Commit b803974

Browse files
committed
group
1 parent 543e6ff commit b803974

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

onnx_diagnostic/helpers/log_helper.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,14 @@ def group_columns(
406406
cls, columns: List[str], sep: str = "/", depth: int = 2
407407
) -> List[List[str]]:
408408
"""Groups columns to have nice display."""
409-
res: Dict[str,List[str]] = {}
409+
res: Dict[str, List[str]] = {}
410410
for c in columns:
411411
p = c.split("/")
412412
k = "/".join(p[:depth])
413413
if k not in res:
414414
res[k] = []
415415
res[k].append(c)
416-
new_res: Dict[str,List[str]] = {}
416+
new_res: Dict[str, List[str]] = {}
417417
for k, v in res.items():
418418
if len(v) >= 3:
419419
new_res[k] = v
@@ -427,8 +427,7 @@ def group_columns(
427427
new_groups: List[List[str]] = []
428428
for v in groups:
429429
if len(v) >= 6:
430-
v = cls.group_columns(v, depth=1, sep=sep)
431-
new_groups.extend(v)
430+
new_groups.extend(cls.group_columns(v, depth=1, sep=sep))
432431
else:
433432
new_groups.append(v)
434433
return new_groups

0 commit comments

Comments
 (0)