Skip to content

Commit 3eae834

Browse files
committed
fix lint
1 parent fcda8f0 commit 3eae834

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

sigllm/primitives/prompting/anomalies.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ def format_anomalies(y, timestamp, padding_size=50):
206206
if len(y) == 0:
207207
return []
208208

209-
print(y)
210209
y = y[y < len(timestamp)].astype(int)
211210
y = timestamp[y] # Convert list of indices into list of timestamps
212211
start, end = timestamp[0], timestamp[-1]

sigllm/primitives/prompting/huggingface.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
2-
import re
32
import json
43
import logging
54
import os
5+
import re
66

77
import torch
88
from tqdm import tqdm
@@ -23,19 +23,19 @@
2323

2424
DEFAULT_MODEL = 'mistralai/Mistral-7B-Instruct-v0.2'
2525

26+
2627
def get_examples(text, k=3):
27-
"""
28-
Extracts the content within the first three sets of parentheses in a string.
28+
"""Extracts the content within the first three sets of parentheses in a string.
2929
30-
Args:
31-
text (str): Input string.
30+
Args:
31+
text (str): Input string.
3232
33-
Returns:
34-
list:
35-
A list containing the content within the first three sets of parentheses.
36-
"""
37-
matches = re.findall(r'\(([^)]*)\)', text)
38-
return matches[:k]
33+
Returns:
34+
list:
35+
A list containing the content within the first three sets of parentheses.
36+
"""
37+
matches = re.findall(r'\(([^)]*)\)', text)
38+
return matches[:k]
3939

4040

4141
class HF:
@@ -75,7 +75,7 @@ def __init__(
7575
raw=False,
7676
samples=10,
7777
padding=0,
78-
restrict_tokens=False
78+
restrict_tokens=False,
7979
):
8080
self.name = name
8181
self.sep = sep
@@ -131,7 +131,7 @@ def detect(self, X, dim=1, normal=None, **kwargs):
131131
X (ndarray):
132132
Input sequences of strings containing signal values.
133133
dim (int, optional):
134-
Number of dimensions of the time series. Default to None.
134+
Number of dimensions of the time series. Default to 1.
135135
normal (str, optional):
136136
A normal reference sequence for one-shot prompting. If None,
137137
zero-shot prompting is used. Default to None.

sigllm/primitives/prompting/timeseries_preprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def rolling_window_sequences(X, window_size=500, step_size=100):
3030
out_X = list()
3131
X_index = list()
3232
dim = X.shape[1]
33-
33+
3434
start = 0
3535
max_start = len(X) - window_size + 1
3636
while start < max_start:

0 commit comments

Comments
 (0)