Skip to content

Commit 1aba01e

Browse files
Merge pull request #46 from salesforce/py3.7
Python 3.7 support
2 parents 326c92b + fdfc8f8 commit 1aba01e

25 files changed

+181
-204
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
python-version: ["3.8", "3.9", "3.10"]
22+
python-version: ["3.7", "3.8", "3.9", "3.10"]
2323

2424
steps:
2525
- uses: actions/checkout@v3

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,22 @@
3838
"toml>=0.10.2",
3939
"build>=0.7.0",
4040
"jupyter>=1.0.0",
41-
"ipykernel>=6.19.4",
41+
"ipykernel>=6.16",
4242
"pytest>=6.2.5",
4343
]
4444
}
4545
extras_require["all"] = sum(extras_require.values(), [])
4646

4747
setup(
4848
name="logai",
49-
version="0.1.4",
49+
version="0.1.5",
5050
description="LogAI is unified framework for AI-based log analytics",
5151
long_description_content_type="text/markdown",
5252
long_description=readme,
5353
author="Qian Cheng, Amrita Saha, Wenzhuo Yang, Chenghao Liu, Gerald Woo, Doyen Sahoo, Steven Hoi",
5454
author_email="logai@salesforce.com",
55-
python_requires=">=3.8.0,<4",
55+
python_requires=">=3.7.0,<4",
5656
install_requires=[
57-
"scikit-learn>=1.2",
5857
"schema>=0.7.5",
5958
"salesforce-merlion>=1.0.0",
6059
"Cython>=0.29.30",

tests/logai/algorithms/anomaly_detection_algo/test_anomaly_detector_het.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,3 @@ def test_het_anomaly_detector(self, log_counter_df):
2929
)
3030
res = model.fit_predict(counter_df)
3131
print(res.head())
32-
return
33-

tests/logai/algorithms/anomaly_detection_algo/test_dbl.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,3 @@ def test_dbl(self, log_counter_df):
4444
res = res.append(anom_score)
4545
assert (res.index == counter_df.index).all(), "Res.index should be identical to counter_df.index"
4646
assert len(res) == len(counter_df.index), "length of res should be equal to length of counter_df"
47-
48-
return
49-
50-
51-
52-

tests/logai/algorithms/anomaly_detection_algo/test_ets.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def setup(self):
2424
def test_ets_detector(self, log_counter_df):
2525
counter_df = log_counter_df
2626

27-
2827
ts_df = counter_df[[constants.LOG_COUNTS]]
2928
ts_df.index = counter_df[constants.LOG_TIMESTAMPS]
3029
counter_df["attribute"] = counter_df.drop([constants.LOG_COUNTS, constants.LOG_TIMESTAMPS], axis=1).apply(
@@ -58,6 +57,3 @@ def test_ets_detector(self, log_counter_df):
5857
print(len(res), counter_df.shape[0])
5958
assert (res.index == counter_df.index).all(), "Res.index should be identical to counter_df.index"
6059
assert len(res) == len(counter_df.index), "length of res should be equal to length of counter_df"
61-
62-
return
63-

tests/logai/algorithms/anomaly_detection_algo/test_one_class_svm.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,3 @@ def test_fit_predict(self, log_features):
3333
assert isinstance(detector.model, OneClassSVM), "Model must be OneClassSVM"
3434
res = detector.predict(log_features)
3535
assert isinstance(res, pd.DataFrame), "result must be pd.DataFrame"
36-
37-
38-

tests/logai/algorithms/feature_extraction_algo/test_label_encoding.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,3 @@ def test_model_creation_2d_attributes(self):
3131

3232
assert isinstance(res, pd.DataFrame), "results not in pandas.DataFrame"
3333
assert (res.columns == ["animals_categorical", "moves_categorical"]).all(), "results does not have correct column names"
34-
35-
36-
37-

tests/logai/algorithms/nn_model/test_tokenizer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,3 @@ def tokenize(self):
2323
tokenizer.normalizer = normalizers.Sequence(
2424
[normalizers.NFD(), normalizers.StripAccents()])
2525
tokenizer.pre_tokenizer = pre_tokenizers.BertPreTokenizer()
26-
27-
return

tests/logai/algorithms/nn_model/test_trainer.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/logai/algorithms/nn_model/test_transformers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,3 @@ def test_train_pred(self, log_pattern):
3838

3939
for l in y_label_pred:
4040
assert l in [0, 1], 'result should be either 0 or 1'
41-
42-

0 commit comments

Comments
 (0)