Add support for white-box explainers to alibi-explain runtime#1279
Merged
adriangonz merged 20 commits intoJul 6, 2023
Conversation
added 10 commits
July 3, 2023 13:37
ascillitoe
commented
Jul 3, 2023
ascillitoe
commented
Jul 3, 2023
ascillitoe
commented
Jul 3, 2023
ascillitoe
commented
Jul 3, 2023
ascillitoe
commented
Jul 3, 2023
ascillitoe
commented
Jul 3, 2023
ascillitoe
commented
Jul 3, 2023
ascillitoe
commented
Jul 3, 2023
adriangonz
reviewed
Jul 3, 2023
adriangonz
left a comment
Contributor
There was a problem hiding this comment.
This is a great PR @ascillitoe !!
I love the test thoroughness - the more tests the better IMO (as long as they are not massively slow!). Added a few comments here-and-there, but they are mainly questions and suggestions - nothing biggie.
added 7 commits
July 4, 2023 13:13
adriangonz
approved these changes
Jul 6, 2023
adriangonz
left a comment
Contributor
There was a problem hiding this comment.
Nice one @ascillitoe! Thanks for making those changes.
Once the linter passes, this looks good to go from my side! Conscious it's still marked as a draft though, so happy to re-review once you think it's ready.
Author
|
Thanks @adriangonz, I'll make the linter changes now and turn off draft once done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for the sklearn API white-box explainers (
TreeShap,TreePartialDependence,PartialDependenceVariance) to theAlibiExplainRuntime.Implementation details
New runtime: Support is implemented via the new
AlibiExplainSKLearnAPIRuntimesubclass. For the remaining white-box explainers two further subclassed runtimes will be required (one being theIntegratedGradientsWrapper). See the notion doc for more details.Tests: Some explainer's have various "nitty-gritty" details wrt to serving, for example the
targetkwarg forIntegratedGradients, callingfitwith no data forTreeShap, and black-box/white-box mode ofPartialDependenceVariancebeing determined bytype(predictor). Therefore, the PR is proposing to perform an E2E test (test_end_2_end) on every explainer (with relevant parametrisation such as testing uri vs init_param's based loading). This would provide more confidence that all explainers can actually be served. However, it will increase the number of tests being run somewhat, so needs discussion...TODO
Docs (leave until all white box explainers supported...)