Skip to content

Commit 15cbc13

Browse files
committed
fix precommit
1 parent d05487a commit 15cbc13

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

anomstack/alerts/asciiart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def make_alert_message(
527527
)
528528
metric_timestamp_to = (
529529
df_alert_metric["metric_timestamp"].max().strftime("%Y-%m-%d %H:%M")
530-
)
530+
)
531531
graph_title = f"{metric_name} ({metric_timestamp_from} to {metric_timestamp_to})"
532532
message = ""
533533
if ascii_graph:

metrics/defaults/sql/llmalert.sql

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,61 @@ Template for generating the input data for the llmalert job.
44

55
with
66

7-
metric_value_data as
7+
metric_value_data as
88
(
99
select distinct
1010
metric_timestamp,
1111
metric_batch,
1212
metric_name,
1313
avg(metric_value) AS metric_value
14-
from
14+
from
1515
{{ table_key }}
1616
where
1717
metric_batch = '{{ metric_batch }}'
18-
and
18+
and
1919
metric_type = 'metric'
20-
and
20+
and
2121
date(metric_timestamp) >= date('now', '-{{ llmalert_metric_timestamp_max_days_ago }} day')
2222
group by metric_timestamp, metric_batch, metric_name
2323
),
2424

25-
metric_score_data as
25+
metric_score_data as
2626
(
2727
select distinct
2828
metric_timestamp,
2929
metric_batch,
3030
metric_name,
3131
avg(metric_value) AS metric_score
32-
from
32+
from
3333
{{ table_key }}
3434
where
3535
metric_batch = '{{ metric_batch }}'
36-
and
36+
and
3737
metric_type = 'score'
38-
and
38+
and
3939
date(metric_timestamp) >= date('now', '-{{ llmalert_metric_timestamp_max_days_ago }} day')
4040
group by metric_timestamp, metric_batch, metric_name
4141
),
4242

43-
metric_alert_data as
43+
metric_alert_data as
4444
(
4545
select distinct
4646
metric_timestamp,
4747
metric_batch,
4848
metric_name,
4949
avg(metric_value) AS metric_alert
50-
from
50+
from
5151
{{ table_key }}
5252
where
5353
metric_batch = '{{ metric_batch }}'
54-
and
54+
and
5555
metric_type = 'alert'
56-
and
56+
and
5757
date(metric_timestamp) >= date('now', '-{{ llmalert_metric_timestamp_max_days_ago }} day')
5858
group by metric_timestamp, metric_batch, metric_name
5959
),
6060

61-
metric_value_recency_ranked as
61+
metric_value_recency_ranked as
6262
(
6363
select
6464
metric_timestamp,
@@ -77,7 +77,7 @@ select
7777
m.metric_value,
7878
ifnull(s.metric_score,0) as metric_score,
7979
ifnull(a.metric_alert,0) as metric_alert
80-
from
80+
from
8181
metric_value_recency_ranked m
8282
left join
8383
metric_score_data s

0 commit comments

Comments
 (0)