v0.7.0
v0.7.0 (2022-05-18)
This release introduces two new methods, a GradientSimilarity explainer and a ProtoSelect data summarisation algorithm.
Added
- New feature
GradientSimilarityexplainer for explaining predictions of gradient-based (PyTorch and TensorFlow) models by returning the most similar training data points from the point of view of the model (docs). - New feature We have introduced a new subpackage
alibi.prototypeswhich contains theProtoSelectalgorithm for summarising datasets with a representative set of "prototypes" (docs). ALEexplainer now can take a custom grid-point per feature to evaluate theALEon. This can help in certain situations when grid-points defined by quantiles might not be the best choice (docs).- Extended the
IntegratedGradientsmethod target selection to handle explaining any scalar dimension of tensors of any rank (previously only rank-1 and rank-2 were supported). See #635. - Python 3.10 support. Note that
PyTorchat the time of writing doesn't support Python 3.10 on Windows.
Fixed
- Fixed a bug which incorrectly handled multi-dimensional scaling in
CounterfactualProto(#646). - Fixed a bug in the example using
CounterfactualRLTabular(#651).
Changed
tensorflowis now an optional dependency. To use methods that requiretensorflowyou can installalibiusingpip install alibi[tensorflow]which will pull in a supported version. For full instructions for the recommended way of installing optional dependencies please refer to Installation docs.- Updated
sklearnversion bounds toscikit-learn>=0.22.0, <2.0.0. - Updated
tensorflowmaximum allowed version to2.9.x.
Development
- This release introduces a way to manage the absence of optional dependencies. In short, the design is such that if an optional dependency is required for an algorithm but missing, at import time the corresponding public (or private in the case of the optional dependency being required for a subset of the functionality of a private class) algorithm class will be replaced by a
MissingDependencyobject. For full details on developingalibiwith optional dependencies see Contributing: Optional Dependencies. - The CONTRIBUTING.md has been updated with further instructions for managing optional dependencies (see point above) and more conventions around docstrings.
- We have split the
Explainerbase class intoBaseandExplainerto facilitate reusability and better class hierarchy semantics with introducing methods that are not explainers (#649). mypyhas been updated to~=0.900which requires additional development dependencies for type stubs, currently onlytypes-requestshas been necessary to add torequirements/dev.txt.- Fron this release onwards we exclude the directories
doc/andexamples/from the source distribution (by addingprunedirectives inMANIFEST.in). This results in considerably smaller file sizes for the source distribution.