File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments