Commit 2a00b13f authored by one's avatar one
Browse files

[xcl-lens] Formatting

parent 14cbf98a
......@@ -135,9 +135,7 @@ class RcclLogParser:
# Part 1: NET/IB : GPU Direct RDMA Enabled for HCA <hca_no> '<hca_id>'
ib_rows = []
pattern_ib = re.compile(
r"NET/IB\s+:\s+GPU Direct RDMA Enabled for HCA\s+(\d+)\s+'([^']+)'"
)
pattern_ib = re.compile(r"NET/IB\s+:\s+GPU Direct RDMA Enabled for HCA\s+(\d+)\s+'([^']+)'")
for (host, rank, content), _ in self.log_entries.items():
m = pattern_ib.search(content)
if m:
......@@ -169,7 +167,8 @@ class RcclLogParser:
# Part 2: GPU Direct RDMA Enabled for GPU <gpu> / HCA <hca_no> (distance <expr>), read <0|1>
gpu_rows = []
pattern_gpu = re.compile(
r"GPU Direct RDMA Enabled for GPU\s+(\S+)\s*/\s*HCA\s+(\d+)\s*\(distance\s+([^)]*)\),\s*read\s+([01])"
r"GPU Direct RDMA Enabled for GPU\s+(\S+)\s*/\s*"
r"HCA\s+(\d+)\s*\(distance\s+([^)]*)\),\s*read\s+([01])"
)
for (host, rank, content), _ in self.log_entries.items():
m = pattern_gpu.search(content)
......@@ -212,7 +211,9 @@ class RcclLogParser:
else:
print(" (No data found)\n")
def _extract_and_print(self, title, filter_func, fields, mandatory, verbose_cols, sort_cols, move_rank=True):
def _extract_and_print(
self, title, filter_func, fields, mandatory, verbose_cols, sort_cols, move_rank=True
):
"""
Generic function to extract structured data from log lines and print as a table.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment