Skip to content

Commit

Permalink
Create drift detection workflow - completed
Browse files Browse the repository at this point in the history
  • Loading branch information
albertovalerio committed Dec 23, 2023
1 parent 553f76c commit 72e5a08
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/drift-detection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,3 @@ jobs:
- name: Data Drift Detection
run: |
python src/features/drift_detection.py
- name: Upload Log Artifact
uses: actions/upload-artifact@v3
with:
name: drift-detection
path: log/drift-detection.log

- name: Commit report
run: |
git status
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "Automated drift detection logs"
git push
10 changes: 0 additions & 10 deletions src/features/drift_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ def get_alibi_features(
grays_test = [cv2.cvtColor(i, cv2.COLOR_BGR2GRAY).flatten() for i in samples_test]
hists_test = [np.histogram(i, 256, [0, 256])[0] for i in grays_test]

alpha = .6
beta = 3

fake = {}
fake['imgs'] = [cv2.convertScaleAbs(img, alpha=alpha, beta=beta) for img in samples_test]
fake['grays'] = [cv2.cvtColor(i, cv2.COLOR_BGR2GRAY).flatten() for i in fake['imgs']]
fake['hists'] = [np.histogram(i, 256, [0, 256])[0] for i in fake['grays']]
hists_test = fake['hists']


print('>>> (3/5) Computing training features...')
hist_avg_train = [i / len(hists_train) for i in list(map(sum, zip(*hists_train)))]
print('>>> (4/5) Computing testing features...')
Expand Down

0 comments on commit 72e5a08

Please sign in to comment.