Skip to content

Commit 6408792

Browse files
committed
Add warning to plot_feature_outier_image
1 parent 9d10d24 commit 6408792

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

alibi_detect/utils/visualize.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pandas as pd
44
from sklearn.metrics import roc_curve, auc
55
from typing import Dict, Union
6+
import warnings
67

78

89
def plot_instance_score(preds: Dict,
@@ -79,6 +80,7 @@ def plot_feature_outlier_image(od_preds: Dict,
7980
instance_ids = instance_ids[:n_instances]
8081

8182
if outliers_only and n_instances == 0:
83+
warnings.warn('No outliers found!', UserWarning, stacklevel=3)
8284
return
8385

8486
n_cols = 2

0 commit comments

Comments
 (0)