Skip to content

Commit

Permalink
Fix formatting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Dec 12, 2024
1 parent ca05bbb commit bb7965e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions python/kvikio/examples/kvikio_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@


class Analyzer:
"""_summary_
"""
"""_summary_"""

def __init__(self, args: argparse.Namespace):
"""_summary_
Expand All @@ -37,8 +36,7 @@ def __init__(self, args: argparse.Namespace):
self.nsys_binary = args.nsys_binary

def _export_report_to_sqlite(self):
"""_summary_
"""
"""_summary_"""
full_cmd_str = (
f"{self.nsys_binary} export --type=sqlite --lazy=false "
+ f"--force-overwrite=true --output={self.sql_path} "
Expand Down Expand Up @@ -94,8 +92,7 @@ def _sql_query(self, filter_string: str) -> pd.DataFrame:

df = pd.read_sql(sql_expr, self.db_connection)
if df.empty:
print(
f'Warning: SQL result is empty for filter string "{filter_string}"')
print(f'Warning: SQL result is empty for filter string "{filter_string}"')
return df

def _generate_hist(self, df: pd.DataFrame) -> tuple[np.ndarray, np.ndarray]:
Expand All @@ -116,7 +113,7 @@ def _generate_hist(self, df: pd.DataFrame) -> tuple[np.ndarray, np.ndarray]:
idx_upperbound = idx
break

tight_bin_edges = self.bin_full_in_MiB[0: (idx_upperbound + 1)]
tight_bin_edges = self.bin_full_in_MiB[0 : (idx_upperbound + 1)]
if max_v > self.bin_full_in_MiB[-1]:
tight_bin_edges.append(max_v)
return np.histogram(my_series, tight_bin_edges)
Expand Down Expand Up @@ -192,8 +189,7 @@ def _process(self, filter_string: str):
self._print(filter_string, hist, bin_edges)

def run(self):
"""_summary_
"""
"""_summary_"""
self._initialize_bins()

self._export_report_to_sqlite()
Expand Down

0 comments on commit bb7965e

Please sign in to comment.