Releases: SeldonIO/alibi
v0.5.3
v0.5.3 (2020-09-01)
Changed
- Updated roadmap
Fixed
- Bug in integrated gradients where incorrect layer handling led to output shape mismatch when explaining layer outputs
- Remove tf.logging calls in example notebooks as TF 2.x API no longer supports tf.logging
- Pin shap to 0.35.0, pending shap 0.36.0 patch release to support shap API updates/library refactoring
v0.5.2
v0.5.2 (2020-08-05)
This release changes the required TensorFlow version from <2.0 to >=2.0. This means that alibi
code depends on TenorFlow>=2.0, however the explainer algorithms are compatible for models trained with both TF1.x and TF2.x.
The alibi
code that depends on TensorFlow itself has not been fully migrated in the sense that the code is still not idiomatic TF2.x code just that we now use the tf.compat.v1
package provided by TF2.x internally. This does mean that for the time being to run algorithms which depend on TensorFlow (CounterFactual
, CEM
and CounterFactualProto
) require disabling TF2.x behaviour by running tf.compat.v1.disable_v2_behavior()
. This is documented in the example notebooks. Work is underway to re-write the TensorFlow dependent components in idiomatic TF2.x code so that this will not be necessary in a future release.
The upgrade to TensorFlow 2.x also enables this to be the first release with Python 3.8 support.
Finally, white-box explainers are now tested with pre-trained models from both TF1.x and TF2.x. The binaries for the models along with loading functionality and datasets used to train these are available in the alibi-testing
helper package which is now a requirement for running tests.
Changed
- Minimum required TensorFlow version is now 2.0
- Tests depending on trained models are now run using pre-trained models hosted under the
alibi-testing
helper package
Fixed
v0.5.1
v0.5.1 (2020-07-10)
This is a bug fix release.
Fixed
- Fix an issue with
AnchorText
not working on text instances with commas due to not checking for empty synonym lists - Enable correct behaviour of
AnchorText
withspacy>=2.3.0
, this now requires installingspacy[lookups]
as an additional dependency which contains model probability tables - Update the
expected_value
attribute ofTreeSHAP
which is internally updated after a call toexplain
- Fix some links in Integrated Gradients examples
- Coverage after running tests on Travis is now correctly reported as the reports are merged for different
pytest
runs - Old
Keras
tests now requireKeras<2.4.0
as the new release requirestensorflow>=2.2
- Bump
typing_extensions>=3.7.2
which includes the typeLiteral
v0.5.0
v0.5.0 (2020-06-10)
This version supports Python 3.6 and 3.7 as support for Python 3.5 is dropped.
Added
- New feature
TreeSHAP
explainer for white-box, tree based model SHAP value computation - New feature
ALE
explainer for computing feature effects for black-box, tabular data models - New feature
IntegratedGradients
explainer for computing feature attributions for TensorFlow and Keras models - Experimental
utils.visualization
module currently containing visualization functions forIntegratedGradients
on image datasets.The location, implementation and content of the module and functions therein are subject to change. - Extend
datasets.fetch_imagenet
to work with any class - Extend
utils.data.gen_category_map
to take a list of strings of column names
Changed
- Internal refactoring of
KernelSHAP
to reuse functionality forTreeSHAP
. Both SHAP wrappers
are now underexplainers.shap_wrappers
- Tests are now split into two runs, one with TensorFlow in eager mode which is necessary for using
IntegratedGradients
- Added
typing-extensions
library as a requirement to take advantage of more precise types - Pinned
scikit-image<0.17
due to a regression upstream - Pinned
Sphinx<3.0
for documentation builds due to some issues with them2r
plugin
Fixed
- Various improvements to documentation
- Some tests were importing old
keras
functions instead oftensorflow.keras
v0.4.0
v0.4.0 (2020-03-20)
NB: This is the last version supporting Python 3.5.
Added
- New feature
KernelSHAP
explainer for black-box model SHAP scores - Documentation for the
LinearityMeasure
algorithm
Changed
- Breaking change New API for explainer and explanation objects. Explainer objects now inherit from
Explainer
base class as a minimum. When calling.explain
method, anExplanation
object is returned (previously a dictionary). This contains two dictionariesmeta
anddata
accessed as attributes of the object, detailing the metadata and the data of the returned explanation. The common interfaces are underapi.interfaces
and default return metadata and data for each explainer are underapi.defaults
. - Complete refactoring of the Anchors algorithms, many code improvements
- Explainer tests are now more modular, utilizing scoped fixtures defined in
explainers.tests.conftest
and various utility functions - Tests are now run sequentially insted of in parallel due to overhead of launching new processes
v0.3.2
v0.3.1
v0.3.0
v0.3.0 (2019-09-25)
Added
- New feature
LinearityMeasure
class andlinearity_measure
function for measuring the linearity of a classifier/regressor - New feature
CounterFactualProto
now supports categorical variables for tabular data
Changed
- Breaking change Remove need for the user to manage TensorFlow sessions for the explanation methods that use TF internally (
CEM
,CounterFactual
,CounterFactualProto
). The session is now inferred or created depending on what is passed topredict
. For finer control thesess
parameter can still be passed in directly - Breaking change Expose low-level arguments to
AnchorText
to the user for finer control of the explanation algorithm, also rename some arguments for consistency - Various improvements to existing notebook examples
Fixed
CounterFactualProto
andCEM
bug when the class is initialized a second time it wouldn't run as the TF graph would become disconnected- Provide more useful error messages if external data APIs are down
- Skip tests using external data APIs if they are down
v0.2.3
v0.2.3 (2019-07-29)
Added
gen_category_map
utility function to facilitate using AnchorTabular explainer- Extend
CounterFactualProto
with a more flexible choice for prototypes using k closest encoded instances - Allow user to specify a hard target class for
CounterFactualProto
- Distributed tests usign
pytest-xdist
to overcome TF global session interfering with tests running in the same process
Changed
- Sample datasets now return a
Bunch
object by default, bundling all necessary and optional attributes for each dataset - Loading sample datasets are now invoked via the
fetch_
functions to indicate that a network download is being made
Fixed
- Remove
Home
from docs sidebar as this was causing the sidebar logo to not show up on landing page