-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sherif akoush/mlsv 42/add alibi explain runtime #320
Merged
sakoush
merged 84 commits into
SeldonIO:master
from
sakoush:SherifAkoush/MLSV-42/add_alibi_explain_runtime
Oct 15, 2021
Merged
Changes from all commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
1e592ce
initial project skeleton for alibi-explain runtime
sakoush 9c10981
POC commit
sakoush 43b1db6
POC prepare testing
sakoush e472624
disable testing
sakoush af1810e
WIP
sakoush 36acbc5
wiring up predict fn
sakoush 56d4552
anchor image with local model
sakoush d439648
add a hacky test for remote_predict
sakoush 7bd1bb9
allow numpy codec for v2 output
sakoush 85eb8fb
MNIST working?
sakoush b469a3f
tidy up
sakoush d90e061
wire up explain parameters (POC)
sakoush 2f48edb
add the ability to load an anchor from disk
sakoush a9ffe5b
push test artifacts
sakoush 1657a2a
remove one TODO!
sakoush d82b0ee
pass kwargs instead
sakoush f519352
defaults are set in alibi
sakoush 44698e9
POC integrated gradients
sakoush 399bb4a
POC integrated gradients with infernece model as uri
sakoush 0f420aa
abstract explainers into bb and wb
sakoush 5ff6390
minor refactor to common utils
sakoush bfc4d2a
add integrated gradients via factory
sakoush a3eb52d
add a test to make sure we can import the strings that define the cla…
sakoush 6cf0fe1
add support for anchor text
sakoush 7b535db
tweaks to get things working
sakoush 8c618a7
tidy up
sakoush b64e3ca
fix test to run automatically
sakoush 6501fcc
tidy up
sakoush b3e8aa8
recover correct settings file
sakoush ebb2b1a
add some comments
sakoush 5d68820
allow quantize from 64->32
sakoush b5f8550
quantize on mlserver side
sakoush 99c065e
remove quantize on mlserver side
sakoush 0d1c9b1
use tf mnist model in test
sakoush fe197c1
add a test for infer_impl
sakoush c324c20
test we get the same results with anchors
sakoush 9f29391
some refactor
sakoush fb3701d
add a test for integrated gradients
sakoush 0fe7fa9
refactor
sakoush 5874335
add a test for the wrapper
sakoush 4b4441a
add retry with tenacity for remote predict
sakoush 77bcd5e
refactor
sakoush 7e08766
refactor #2
sakoush 6daf1aa
use StringCodec
sakoush c008320
remove tenacity and add a todo to consider retry
sakoush 09547b3
fmt
sakoush d801eb0
lint
sakoush e16f5c5
mypy set#1
sakoush de42b34
mypy set#2
sakoush 642c0e4
mypy set#3
sakoush cea0446
refactor
sakoush 86e72dd
refactor #2
sakoush bc48764
remove dep on mlflow in alibi runtime tests
sakoush 37332e3
refactor
sakoush b6d27af
pin fastapi to 0.68.2 as it will fail tests
sakoush 2f98c9c
lets be safe and pin fastapi version for now.
sakoush f03a576
fix tests
sakoush 82bbc04
lint
sakoush 7055ea0
Add the support of List of string for black box explainers (AnchorText)
sakoush 0384120
fix lint issue
sakoush 1af15b6
fixes for anchor text working
sakoush 1cc91c9
add a test for numpy codec
sakoush e82e1cf
tidy up numpy codec
sakoush 588f178
add tests for str codec
sakoush e396277
refactor and add a test for black box v2 inference request encoding
sakoush fc1c255
add more tests
sakoush 402df44
use assert_array_almost_equal
sakoush acfb093
refactor to fix tests
sakoush 012f620
fmt
sakoush 5d0b7a4
add a test for explain parameters pass through
sakoush 7eba4a0
check also data is wired through properly
sakoush ed5f2a3
add a test for explain parameters pass through
sakoush 602cd1f
set default alibi detect settings
sakoush 6925b0a
use mlserver errors
sakoush 81a296c
make alibi dependency reference mode readable
sakoush 3720a26
add exceptions for black box explainers
sakoush e525b56
and for whitebox
sakoush b992a30
share common code for loading explainers from disk
sakoush 66c0080
revert param rename
sakoush 5b433d9
check inference uri in init
sakoush 9afd2aa
tidy up exception handling
sakoush 6d272be
PR comments
sakoush 03ad825
add anchor tabular
sakoush 8f449ff
PR comments
sakoush File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+199 Bytes
docs/examples/alibi-explain/data/mnist_anchor_image/segmentation_fn.dill
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "anchor-image-explain-model", | ||
"implementation": "mlserver_alibi_explain.AlibiExplainRuntime", | ||
"parallel_workers": 0, | ||
"parameters": { | ||
"uri": "./data/mnist_anchor_image", | ||
"version": "v0.1.0", | ||
"extra": { | ||
"explainer_type": "anchor_image", | ||
"infer_uri": "http://localhost:42315/v2/models/test-pytorch-mnist/infer" | ||
} | ||
} | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"debug": "true" | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we set it to
None
, would we also need thetype: ignore
comment?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because we need also to set it as
Optional
. this has been used elsewhere as well.