Releases: SeldonIO/alibi-detect
Releases · SeldonIO/alibi-detect
v0.10.2
v0.10.1
v0.10.0
v0.10.0 (2022-07-26)
Added
- New feature Drift detectors save/load functionality has been significantly reworked. All offline and online drift detectors (
tensorflow
backend only) can now be saved and loaded viaconfig.toml
files, allowing for more flexibility. Config files are also validated withpydantic
. See the documentation for more info (#516). - New feature Option to use out-of-bag predictions when using a
RandomForestClassifier
withClassifierDrift
(#426). - Python 3.10 support. Note that PyTorch at the time of writing doesn't support Python 3.10 on Windows (#485).
Fixed
- Fixed a bug in the TensorFlow trainer which occured when the data was a minibatch of size 2 (#492).
Changed
- TensorFlow is now an optional dependency. Error messages for incorrect use of detectors that are dependent on missing optional dependencies have been improved to include installation instructions and be more informative (#537).
- The optional dependency work has resulted in some imports being reorganised. The original imports will still work as long as the relevant optional dependencies are installed (#538).
from alibi_detect.utils.tensorflow.kernels import DeepKernel
->from alibi_detect.utils.tensorflow import DeepKernel
from alibi_detect.utils.tensorflow.prediction import predict_batch
->from alibi_detect.utils.tensorflow import predict_batch
from alibi_detect.utils.pytorch.data import TorchDataset
->from alibi_detect.utils.pytorch import TorchDataset
from alibi_detect.models.pytorch.trainer import trainer
->from alibi_detect.models.pytorch import trainer
from alibi_detect.models.tensorflow.resnet import scale_by_instance
->from alibi_detect.models.tensorflow import scale_by_instance
from alibi_detect.models.tensorflow.resnet import scale_by_instance
->from alibi_detect.models.tensorflow import scale_by_instance
from alibi_detect.utils.pytorch.kernels import DeepKernel
->from alibi_detect.utils.pytorch import DeepKernel
from alibi_detect.models.tensorflow.autoencoder import eucl_cosim_features
->from alibi_detect.models.tensorflow import eucl_cosim_features
from alibi_detect.utils.tensorflow.prediction import predict_batch
->from alibi_detect.utils.tensorflow import predict_batch
from alibi_detect.models.tensorflow.losses import elbo
->from alibi_detect.models.tensorflow import elbo
from alibi_detect.models import PixelCNN
->from alibi_detect.models.tensorflow import PixelCNN
from alibi_detect.utils.tensorflow.data import TFDataset
->from alibi_detect.utils.tensorflow import TFDataset
from alibi_detect.utils.pytorch.data import TorchDataset
->from alibi_detect.utils.pytorch import TorchDataset
- The maximum
tensorflow
version has been bumped from 2.8 to 2.9 (#508). - breaking change The
detector_type
field in thedetector.meta
dictionary now indicates whether a detector is a 'drift', 'outlier' or 'adversarial' detector. Its previous meaning, whether a detector is online or offline, is now covered by theonline
field (#564).
Development
- Added
MissingDependency
class andimport_optional
for protecting objects that are dependent on optional dependencies (#537). - Added
BackendValidator
to factor out similar logic across detectors with backends (#538). - Added missing CI test for
ClassifierDrift
withsklearn
backend (#523). - Fixed typing for
ContextMMDDrift
pytorch
backend withnumpy
>=1.22 (#520). - Drift detectors with backends refactored to perform distance threshold computation in
score
instead ofpredict
(#489). - Factored out PyTorch device setting to
utils.pytorch.misc.get_device()
(#503). Thanks to @kuutsav! - Added
utils._random
submodule andpytest-randomly
to manage determinism in CI build tests (#496). - From this release onwards we exclude the directories
doc/
andexamples/
from the source distribution (by addingprune
directives inMANIFEST.in
). This results in considerably smaller file sizes for the source distribution. mypy
has been updated to~=0.900
which requires additional development dependencies for type stubs, currently onlytypes-requests
andtypes-toml
have been necessary to add torequirements/dev.txt
.
v0.9.1
v0.9.1 (2022-04-01)
Fixed
- Fixed an issue whereby simply importing the library in any capacity caused tensorflow to occupy all available GPU memory. This was due to the instantiation of
tf.keras.Model
objects within a class definition (GaussianRBF
objects within theDeepKernel
class).
v0.9.0
v0.9.0 (2022-03-17)
Added
- Added the ContextMMDDrift detector. The context-aware maximum mean discrepancy drift detector (Cobb and Van Looveren, 2022) is a kernel based method for detecting drift in a manner that can take relevant context into account.
Fixed
- Fixed an issue experienced when the Model uncertainty based drift detection example is run on GPU's (#445).
- Fixed an issue with the Text drift detection on IMDB example to allow PyTorch to be used (#438).
Development
- The maximum
tensorflow
version has been bumped from 2.7 to 2.8 (#444).
v0.8.1
v0.8.1 (2022-01-18)
Added
- New feature
ClassifierDrift
now supportssklearn
models (#414). See this example.
Changed
- Python 3.6 has been deprecated from the supported versions as it has reached end-of-life.
Fixed
- The
SpectralResidual
detector now uses padding to prevent spikes occuring at the beginning and end of scores (#396). - The handling of url's in the dataset and model fetching methods has been modified to fix behaviour on Windows platforms.
Development
v0.8.0
v0.8.0 (2021-12-09)
Added
- Offline and online versions of Fisher's Exact Test detector for supervised drift detection on binary data:
from alibi_detect.cd import FETDrift, FETDriftOnline
. - Offline and online versions of Cramér-von Mises detector for supervised drift detection on continuous data:
from alibi_detect.cd import CVMDrift, CVMDriftOnline
. - Offline supervised drift detection example on the penguin classification dataset.
Changed
- Refactored online detectors to separate updating of state (#371).
- Update
tensorflow
lower bound to 2.2 due to minimum requirements fromtransformers
.
Fixed
- Fixed incorrect kwarg name in
utils.tensorflow.distance.permed_lsdd
function (#399).
Development
- Updated
sphinx
for documentation building to>=4.2.0
. - Added a
CITATIONS.cff
file for consistent citing of the library. - CI actions are now not triggered on draft PRs (apart from a
readthedoc
build). - Removed dependency on
nbsphinx_link
and moved examples underdoc/source/examples
with symlinks from the top-levelexamples
directory.
v0.7.3
v0.7.3 (2021-10-29)
Added
DeepKernel
is allowed without thekernel_b
component, giving a kernel consisting of only a deep kernel component (kernel_a
).- Documentation layout refreshed, and a new "Background to drift detection" added.
Fixed
- Model fetching methods now correctly handle nested filepaths.
- For backward compatibility, fetch and load methods now attept to fetch/load
dill
files, but fall back topickle
files. - Prevent
dill
from extendingpickle
dispatch table. This prevents undesirable behaviour if usingpickle
/joblib
withoutdill
imported later on (see #326). - For consistency between
save_detector
andload_detector
,fetch_detector
will no longer appenddetector_name
tofilepath
.
v0.7.2
v0.7.2 (2021-08-17)
Added
- Learned kernels drift detector with TensorFlow and PyTorch support:
from alibi_detect.cd import LearnedKernelDrift
- Spot-the-diff drift detector with TensorFlow and PyTorch support:
from alibi_detect.cd import SpotTheDiffDrift
- Online drift detection example on medical imaging data:
https://github.com/SeldonIO/alibi-detect/blob/master/examples/cd_online_camelyon.ipynb
v0.7.1
v0.7.1 (2021-07-22)
Added
- Extend allowed input type for drift detectors to include List[Any] with additional graph and text data examples.
- Allow custom preprocessing steps within
alibi_detect.utils.pytorch.prediction.predict_batch
andalibi_detect.utils.tensorflow.prediction.predict_batch
. This makes it possible to take List[Any] as input and combine instances in the list into batches of data in the right format for the model.
Removed
- PCA preprocessing step for drift detectors.
Fixed
- Improve numerical stability LSDD detectors (offline and online) to avoid overflow/underflow caused by higher dimensionality of the input data.
- Spectral Residual outlier detector test.