Skip to content

Commit

Permalink
update black code formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
harp-intel committed Aug 28, 2024
1 parent bb0a07d commit edff0c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions perf-postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,11 @@ def extract_dataframe(perf_data_lines, meta_data, perf_mode):

# fix metric name X.1, X.2, etc -> just X
perf_data_df["metric"] = perf_data_df.apply(
lambda x: ".".join(x["metric"].split(".")[:-1])
if len(re.findall(r"^[0-9]*$", x["metric"].split(".")[-1])) > 0
else x["metric"],
lambda x: (
".".join(x["metric"].split(".")[:-1])
if len(re.findall(r"^[0-9]*$", x["metric"].split(".")[-1])) > 0
else x["metric"]
),
axis=1,
)

Expand Down Expand Up @@ -1026,9 +1028,7 @@ def generate_metrics(
+ (
"System"
if perf_mode == Mode.System
else "CPU"
if perf_mode == Mode.CPU
else "Socket"
else "CPU" if perf_mode == Mode.CPU else "Socket"
)
+ " mode"
)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==22.8.0
black==24.8.0
flake8
pytype
simpleeval
Expand Down
2 changes: 1 addition & 1 deletion src/perf_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def nmi_watchdog_enabled():
return None
try:
nmi_watchdog_status = int(proc_output.decode().strip())
except (ValueError) as e:
except ValueError as e:
logging.warning(f"Failed to interpret nmi_watchdog status: {e}")
return None
return nmi_watchdog_status == 1
Expand Down

0 comments on commit edff0c3

Please sign in to comment.