Python formatting

Signed-off-by: colramos-amd <colramos@amd.com>


[ROCm/rocprofiler-compute commit: d6f45411eb]
这个提交包含在:
colramos-amd
2024-03-01 11:52:31 -06:00
提交者 Cole Ramos
父节点 abefd57924
当前提交 9ff07b51ff
共修改 19 个文件,包含 688 行新增和 380 行删除
+10 -6
查看文件
@@ -51,10 +51,12 @@ def string_multiple_lines(source, width, max_rows):
def get_table_string(df, transpose=False, decimal=2):
return tabulate(df.transpose() if transpose else df,
headers="keys",
tablefmt="fancy_grid",
floatfmt="." + str(decimal) + "f")
return tabulate(
df.transpose() if transpose else df,
headers="keys",
tablefmt="fancy_grid",
floatfmt="." + str(decimal) + "f",
)
def show_all(args, runs, archConfigs, output):
@@ -221,9 +223,11 @@ def show_all(args, runs, archConfigs, output):
# df when load it, because we need those items in column.
# For metric_table, we only need to show the data in column
# fash for now.
transpose = (type != "raw_csv_table"
transpose = (
type != "raw_csv_table"
and "columnwise" in table_config
and table_config["columnwise"] == True)
and table_config["columnwise"] == True
)
ss += (
get_table_string(df, transpose=transpose, decimal=args.decimal)
+ "\n"