Skip to content

Commit

Permalink
Update test_dl_detector.py
Browse files Browse the repository at this point in the history
  • Loading branch information
951378644 authored Dec 27, 2023
1 parent 90871cb commit 66ab8be
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/menelaus/data_drift/test_dl_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,21 @@ def test_dl_detector_update_3():
det.update(test, by_feature=False)
assert det.drift_state is not None


def test_dl_detector_update_4():
"""Ensure dl_detector can update with drift actions triggered when X_by_feature is activated"""
det = DL_Detector()
ref = pd.DataFrame(
np.ones((rows, columns)), columns=[f"Column_{i}" for i in range(columns)]
)
test = pd.DataFrame(
np.random.randint(0, 100, size=(rows, columns)),
columns=[f"Column_{i}" for i in range(columns)],
)
det.set_reference(ref)
det.update(test, X_by_feature='Column_0')
assert det.drift_state is not None

def test_dl_detector_update_5():
"""Check dl_detector.update behavior after drift alarm"""
det = DL_Detector()
ref = pd.DataFrame(
Expand Down

0 comments on commit 66ab8be

Please sign in to comment.