Skip to content

v0.10.0

Compare
Choose a tag to compare
@ascillitoe ascillitoe released this 26 Jul 13:40
· 207 commits to master since this release

v0.10.0 (2022-07-26)

Full Changelog

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 via config.toml files, allowing for more flexibility. Config files are also validated with pydantic. See the documentation for more info (#516).
  • New feature Option to use out-of-bag predictions when using a RandomForestClassifier with ClassifierDrift (#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 the detector.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 the online field (#564).

Development

  • Added MissingDependency class and import_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 with sklearn backend (#523).
  • Fixed typing for ContextMMDDrift pytorch backend with numpy>=1.22 (#520).
  • Drift detectors with backends refactored to perform distance threshold computation in score instead of predict (#489).
  • Factored out PyTorch device setting to utils.pytorch.misc.get_device() (#503). Thanks to @kuutsav!
  • Added utils._random submodule and pytest-randomly to manage determinism in CI build tests (#496).
  • From this release onwards we exclude the directories doc/ and examples/ from the source distribution (by adding prune directives in MANIFEST.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 only types-requests and types-toml have been necessary to add to requirements/dev.txt.