Skip to content

Commit 907dd7c

Browse files
committed
fix precommit
1 parent 15cbc13 commit 907dd7c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

anomstack/alerts/asciiart.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,14 @@ def make_alert_message(
532532
message = ""
533533
if ascii_graph:
534534
labels = (
535-
np.where(df_alert_metric["metric_alert"] == 1, anomaly_symbol, normal_symbol)
536-
+ (df_alert_metric[score_col].round(2) * 100).astype("int").astype("str")
535+
np.where(
536+
df_alert_metric["metric_alert"] == 1,
537+
anomaly_symbol,
538+
normal_symbol
539+
)
540+
+ (df_alert_metric[score_col].round(2) * 100)
541+
.astype("int")
542+
.astype("str")
537543
+ "% "
538544
)
539545
data = zip(labels, x)

anomstack/jobs/llmalert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def llmalert(context, df: pd.DataFrame) -> None:
126126
df_metric[["metric_timestamp", "metric_value", "metric_recency"]]
127127
.dropna()
128128
)
129-
df_prompt["metric_timestamp"] = df_metric["metric_timestamp"].dt.strftime(
130-
"%Y-%m-%d %H:%M:%S"
131-
)
129+
df_prompt["metric_timestamp"] = df_metric[
130+
"metric_timestamp"
131+
].dt.strftime("%Y-%m-%d %H:%M:%S")
132132
df_prompt = df_prompt.set_index("metric_timestamp")
133133
if llmalert_metric_rounding >= 0:
134134
df_prompt = df_prompt.round(llmalert_metric_rounding)

0 commit comments

Comments
 (0)