diff --git a/.github/workflows/drift-detection.yaml b/.github/workflows/drift-detection.yaml index f2f1ccf..6f19cb2 100644 --- a/.github/workflows/drift-detection.yaml +++ b/.github/workflows/drift-detection.yaml @@ -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 diff --git a/src/features/drift_detection.py b/src/features/drift_detection.py index ea4308b..33824f7 100644 --- a/src/features/drift_detection.py +++ b/src/features/drift_detection.py @@ -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...')