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
GradientSimilarity
explainer 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.prototypes
which contains theProtoSelect
algorithm for summarising datasets with a representative set of "prototypes" (docs). ALE
explainer now can take a custom grid-point per feature to evaluate theALE
on. This can help in certain situations when grid-points defined by quantiles might not be the best choice (docs).- Extended the
IntegratedGradients
method 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
PyTorch
at 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
tensorflow
is now an optional dependency. To use methods that requiretensorflow
you can installalibi
usingpip 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
sklearn
version bounds toscikit-learn>=0.22.0, <2.0.0
. - Updated
tensorflow
maximum 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
MissingDependency
object. For full details on developingalibi
with 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
Explainer
base class intoBase
andExplainer
to facilitate reusability and better class hierarchy semantics with introducing methods that are not explainers (#649). mypy
has been updated to~=0.900
which requires additional development dependencies for type stubs, currently onlytypes-requests
has been necessary to add torequirements/dev.txt
.- Fron 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.