Skip to content

Commit 168272c

Browse files
committed
ga: add precommit
1 parent 95ec08d commit 168272c

File tree

4 files changed

+35
-14
lines changed

4 files changed

+35
-14
lines changed

.pre-commit-config.yaml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
4-
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.2.0
6-
hooks:
7-
- id: trailing-whitespace
8-
- id: end-of-file-fixer
9-
- id: check-yaml
10-
- id: check-added-large-files
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v3.2.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: local
12+
hooks:
13+
- id: nbdev_docs
14+
name: nbdev_docs
15+
entry: nbdev_docs
16+
language: system
17+
pass_filenames: false
18+
- repo: local
19+
hooks:
20+
- id: nbdev_readme
21+
name: nbdev_readme
22+
entry: nbdev_readme
23+
language: system
24+
pass_filenames: false
25+
- repo: local
26+
hooks:
27+
- id: nbdev_export
28+
name: nbdev_export
29+
entry: nbdev_export
30+
language: system
31+
pass_filenames: false

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This is a work in progress.
99
#### TODO
1010

1111
- [ ] Separate training from notebooks
12+
- [ ] Fix github-actions
13+
- [ ] Page deployment
14+
- [ ] CI tests
15+
- [x] precommit
1216
- [x] Build complete AD pipeline
1317
- [ ] include fine-grained threshold for within window detection.
1418
- [x] use a squared term if the absolute element-wise error falls below
@@ -36,7 +40,7 @@ beyond a threshold (L2 norm) is considered an anomaly.
3640
In the figure, red dashed lines are the true labels in the hidden set.
3741
Pink window is the region where anomaly was predicted.
3842

39-
![sample_data/image.png](sample_data/result.png)
43+
![sample_data/image.png](index_files/figure-commonmark/cell-5-1-image.png)
4044

4145
## Misc
4246

nbs/index.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"- [ ] Fix github-actions\n",
1717
" - [ ] Page deployment\n",
1818
" - [ ] CI tests\n",
19-
" - [ ] precommit\n",
19+
" - [x] precommit\n",
2020
"- [x] Build complete AD pipeline\n",
2121
"- [ ] include fine-grained threshold for within window detection.\n",
2222
"- [x] use a squared term if the absolute element-wise error falls below delta and a delta-scaled L1 term otherwise (Huber)\n",

ts_vae_lstm/ad_complete.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/03_ad_complete.ipynb.
22

33
# %% auto 0
4-
__all__ = ['BASEDIR', 'MODELDIR', 'VAE_MODEL', 'LSTM_MODEL', 'df', 'predict_next_embeddings', 'reconstruct_ts', 'AD']
4+
__all__ = ['BASEDIR', 'MODELDIR', 'VAE_MODEL', 'LSTM_MODEL', 'predict_next_embeddings', 'reconstruct_ts', 'AD']
55

66
# %% ../nbs/03_ad_complete.ipynb 3
77
import pandas as pd
@@ -39,10 +39,6 @@
3939

4040
print(f"LSTM model: {LSTM_MODEL}\nVAE model: {VAE_MODEL}")
4141

42-
# %% ../nbs/03_ad_complete.ipynb 15
43-
df = pd.DataFrame(data_test_norm, index=data["t_test"], columns=["value"])
44-
df.head(2)
45-
4642
# %% ../nbs/03_ad_complete.ipynb 24
4743
@torch.no_grad()
4844
def predict_next_embeddings(emb, lstm_model):

0 commit comments

Comments
 (0)