Releases: SeldonIO/alibi
Releases · SeldonIO/alibi
v0.9.6
v0.9.6 (2024-04-18)
This is a minor release.
Changed
- Removed explicit dependency on Pydantic (#1002)
Development
- Bump tj-actions/changed-files from 1.1.2 to 41.0.0 in /.github/workflows (#992)
- Update README.md (#996)
- Update numba requirement from !=0.54.0,<0.59.0,>=0.50.0 to >=0.50.0,!=0.54.0,<0.60.0 (#999)
- Update twine requirement from <5.0.0,>3.2.0 to >3.2.0,<6.0.0 (#1001)
- build(ci): Migrate actions to later Node version (#1003)
v0.9.5
v0.9.5 (2024-01-22)
This is a patch release fixing several bugs, updating dependencies and a change of license.
Fixed
- Fix torch version bound in setup.py extras_require (#950)
- Fix DistributedExplainer import errors that arise when ray absent(#951)
- Fix memory limit issue in tox ci jobs (#956)
- Fix E721 linting errors (#958)
- Fix plot_pd function to work with matplotlib 3.8.0 changes (#965)
- Fix typechecking with matplotlib 3.8.0 (#969)
- fix typechecking for matplotlib 3.8.1 (#981)
- Fix typechecking for mypy 1.7.0 (#983)
- Fix test models to output logits and work with default loss functions (#975)
- Fix dtype type in helper method for AnchorText samplers (#980)
Changed
- Alibi License change from Apache to Business Source License 1.1 (#995)
Development
- Update myst-parser requirement upper bound from 2.0 to 3.0 (#931)
- Update pillow requirement upper bound from 10.0 to 11.0 (#939)
- Add notebooks tests for python 3.11 (#948) & (#949)
- Update sphinxcontrib-apidoc requirement upper bound from 0.4.0 to 0.5.0 (#962)
- Update numba requirement upper bound from 0.58.0 to 0.59.0 (#967)
- Update shap requirement upper bound from 0.43.0 to 0.44.0 (#974)
- Update tensorflow requirement upper bound from 2.14.0 to 2.15.0 (#968)
- Update Alibi_Explain_Logo_rgb image with white stroked letters (#979)
- Remove macos from ci (#995)
- Add security scans to CI (#995)
v0.9.4
v0.9.4 (2023-07-07)
This is a patch release to support numpy >= 1.24
and scikit-learn >= 1.3.0
, and drop official support for Python 3.7.
Development
v0.9.3
v0.9.3 (2023-06-21)
This is a patch release to officially enable support for Python 3.11.
This is the last release with official support for Python 3.7.
Development
- Test library on Python 3.11 (#932).
- Separate code quality into its own Github Action and only run against the main development version of Python, currently Python 3.10 (#925).
- Check and remove stale
mypy
ignore commands (#874). - Bump
torch
version to2.x
(#893). - Bump
scikit-image
version to0.21.x
(#928). - Bump
numba
version to0.57.x
(#922). - Bump
sphinx
version to7.x
(#921).
v0.9.2
v0.9.2 (2023-04-28)
This is a patch release fixing several bugs, updating dependencies and adding some small extensions.
Added
- Allow
IntegratedGradients
layer selection to be specified with a custom callable (#894). - Implement
reset_predictor
method forPartialDependence
explainer (#897). - Extend
GradientSimilarity
explainer to allow models of any input type (#912).
Fixed
AnchorText
auto-regressive language model sampler updatinginput_ids
tensor (#895).AnchorTabular
length discrepancy betweenfeature
andnames
fields (#902).AnchorBaseBeam
unintended coverage update during the multi-armed bandit run (#919, #914).
Changed
- Maximum supported version of
tensorflow
bumped to2.12.x
(#896). - Supported version of
pandas
bumped to>1.0.0, <3.0.0
(#899). - Update notebooks to account for
pandas
version2.x
deprecations (#908, #910). - Maximum supported version of
scikit-image
bumped to0.20.x
(#882). - Maximum supported version of
attrs
bumped to23.x
(#905).
Development
- Migrate
codecov
to use Github Actions and don't fail CI on coverage report upload failure due to rate limiting (#901, #913). - Bumpy
mypy
version to>=1.0, <2.0
(#886). - Bump
sphinx
version to6.x
(#852). - Bump
sphinx-design
version to0.4.1
(#904). - Bump
nbsphinx
version to0.9.x
(#889). - Bump
myst-parser
version to>=1.0, <2.0
(#887). - Bump
twine
version to4.x
(#620). - Bump
pre-commit
version to3.x
and update the config (#866).
v0.9.1
v0.9.1 (2023-03-13)
This is a patch release fixing several bugs.
Fixed
- Replace deprecated usage of
np.object
in the codebase which was causing errors withnumpy>=1.24
(#872, #890). - Fix a bug/typo in
cfrl_base.py
of thetensorflow
backend (#891). - Correctly handle calls to
.reset_predictor
forKernelShap
andTreeShap
explainers (#880). - Update saving of
KernelShap
to avoid saving the internal_explainer
object (#881).
Development
v0.9.0
v0.9.0 (2023-01-11)
Added
- New feature
PermutationImportance
explainer implementing the permutation feature importance global explanations. Also included is aplot_permutation_importance
utility function for flexible plotting of the resulting feature importance scores (docs, #798). - New feature
PartialDependenceVariance
explainer implementing partial dependence variance global explanations. Also included is aplot_pd_variance
utility function for flexible plotting of the resulting PD variance plots (docs, #758).
Fixed
GradientSimilarity
explainer now automatically handles sparse tensors in the model by converting the gradient tensors to dense ones before calculating similarity. This used to be a source of bugs when calculating similarity for models with embedding layers for which gradients tensors are sparse by default. Additionally, it now filters any non-trainable parameters and doesn't consider those in the calculation as no gradients exist. A warning is raised if any non-trainable layers or parameters are detected (#829).- Updated the discussion of the interpretation of
ALE
. The previous examples and documentation had some misleading claims; these have been removed and reworked with an emphasis on the mostly qualitative interpretation ofALE
plots (#838, #846).
Changed
- Deprecated the use of the legacy Boston housing dataset in examples and testing. The new examples now use the California housing dataset (#838, #834).
- Modularized the computation of prototype importances and plotting for
ProtoSelect
, allowing greater flexibility to the end user (#826). - Roadmap documentation page removed due to going out of date (#842).
Development
- Tests added for
tensorflow
models used inCounterfactualRL
(#793). - Tests added for
pytorch
models used inCounterfactualRL
(#799). - Tests added for
ALE
plotting functionality (#816). - Tests added for
PartialDependence
plotting functionality (#819). - Tests added for
PartialDependenceVariance
plotting functionality (#820). - Tests added for
PermutationImportance
plotting functionality (#824). - Tests addef for
ProtoSelect
plotting functionality (#841). - Tests added for the
datasets
subpackage (#814). - Fixed optional dependency installation during CI to make sure dependencies are consistent (#817).
- Synchronize notebook CI workflow with the main CI workflow (#818).
- Version of
pytest-cov
bumped to4.x
(#794). - Version of
pytest-xdist
bumped to3.x
(#808). - Version of
tox
bumped to4.x
(#832).
v0.8.0
v0.8.0 (2022-09-26)
Added
- New feature
PartialDependence
andTreePartialDependence
explainers implementing partial dependence (PD) global explanations. Also included is aplot_pd
utility function for flexible plotting of the resulting PD plots (docs, #721). - New
exceptions.NotFittedError
exception which is raised whenever a compulsory call to afit
method has not been carried out. Specifically, this is now raised inAnchorTabular.explain
whenAnchorTabular.fit
has been skipped (#732). - Various improvements to docs and examples (#695, #701, #698, #703, #717, #711, #750, #784).
Fixed
- Edge case in
AnchorTabular
where an error is raised during anexplain
call if the instance contains a categorical feature value not seen in the training data (#742).
Changed
- Improved handling of custom
grid_points
for theALE
explainer (#731). - Renamed our custom exception classes to remove the verbose
Alibi*
prefix and standardised the*Error
suffix. Concretely:exceptions.AlibiPredictorCallException
is nowexceptions.PredictorCallError
exceptions.AlibiPredictorReturnTypeError
is nowexceptions.PredictorReturnTypeError
. Backwards compatibility has been maintained by subclassing the new exception classes by the old ones, but these will likely be removed in a future version (#733).
- Warn users when
TreeShap
is used with more than 100 samples in the background dataset which is due to a limitation in the upstreamshap
package (#710). - Minimum version of
scikit-learn
bumped to1.0.0
mainly due to upcoming deprecations (#776). - Minimum version of
scikit-image
bumped to0.17.2
to fix a possible bug when using theslic
segmentation function withAnchorImage
(#753). - Maximum supported version of
attrs
bumped to22.x
(#727). - Maximum supported version of
tensorflow
bumped to2.10.x
(#745). - Maximum supported version of
ray
bumped to2.x
(#740). - Maximum supported version of
numba
bumped to0.56.x
(#724). - Maximum supported version of
shap
bumped to0.41.x
(#702). - Updated
shap
example notebooks to recommend installingmatplotlib==3.5.3
due to failure ofshap
plotting functions withmatplotlib==3.6.0
(#776).
Development
- Extend optional dependency checks to ensure the correct submodules are present (#714).
- Introduce
pytest-custom_exit_code
to let notebook CI pass when no notebooks are selected for tests (#728). - Use UTF-8 encoding when loading
README.md
insetup.py
to avoid a possible failure of installation for some users (#744). - Updated guidance for class docstrings (#743).
- Reinstate
ray
tests (#756). - We now exclude test files from test coverage for a more accurate representation of coverage (#751). Note that this has led to a drop in code covered which will be addressed in due course (#760).
- The Python
3.10.x
version on CI has been pinned to3.10.6
due to typechecking failures, pending a new release ofmypy
(#761). - The
test_changed_notebooks
workflow can now be triggered manually and is run on push/PR for any branch (#762). - Use
codecov
flags for more granular reporting of code coverage (#759). - Option to ssh into Github Actions runs for remote debugging of CI pipelines (#770).
- Version of
sphinx
bumped to5.x
but capped at<5.1.0
to avoid CI failures (#722). - Version of
myst-parser
bumped to0.18.x
(#693). - Version of
flake8
bumped to5.x
(#729). - Version of
ipykernel
bumped to6.x
(#431). - Version of
ipython
bumped to8.x
(#572). - Version of
pytest
bumped to7.x
(#591). - Version of
sphinx-design
bumped to0.3.0
(#739). - Version of
nbconvert
bumped to7.x
(#738).
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.
v0.6.5
v0.6.5 (2022-03-18)
This is a patch release to correct a regression in CounterfactualProto
introduced in v0.6.3
.
Added
- Added a Frequently Asked Questions page to the docs.
Fixed
- Fix a bug introduced in
v0.6.3
which preventedCounterfactualProto
working with categorical features (#612). - Fix an issue with the
LanguageModelSampler
where it would sometimes sample punctuation (#585).
Development
- The maximum
tensorflow
version has been bumped from 2.7 to 2.8 (#588).