Skip to content
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

Update Alibi Explainers to 0.4.0 Release #803

Merged
merged 23 commits into from May 26, 2020
Merged

Update Alibi Explainers to 0.4.0 Release #803

merged 23 commits into from May 26, 2020

Conversation

cliveseldon
Copy link
Contributor

Fixes #792

  • Updates library for 0.4.0 release of Alibi
  • Adds tests for Anchors Tabular, Text and Images

@kubeflow-bot
Copy link

This change is Reviewable

@cliveseldon cliveseldon changed the title WIP: Update Alibi Explainers to 0.4.0 Release Update Alibi Explainers to 0.4.0 Release May 5, 2020
@cliveseldon
Copy link
Contributor Author

/retest

@jinchihe
Copy link
Contributor

@cliveseldon I noticed you already added that in ignore list, but still failed, I guess that's caused the syntax-error in anchor_tabular.py and explainer.py. Yeah, we need upgrade that. But for pylint issues in test_anchor_tabular.py and test_anchor_text.py , that should be ignored, or disabled, or fixed. otherwise, guess that still be fail in Python 3.6+,

8d73/src/kubeflow/kfserving/python/alibiexplainer/tests/test_anchor_tabular.py 
cwd=/mnt/test-data-volume/kubeflow-kfserving-presubmit-e2e-803-493ba35-4881-8d73/src/kubeflow/kfserving/python
INFO|2020-05-06T18:04:44|util.py:61| Subprocess output:

INFO|2020-05-06T18:04:45|util.py:72| Using config file /mnt/test-data-volume/kubeflow-kfserving-presubmit-e2e-803-493ba35-4881-8d73/src/kubeflow/kfserving/python/.pylintrc
INFO|2020-05-06T18:04:45|util.py:72| ************* Module tests.test_anchor_tabular
INFO|2020-05-06T18:04:45|util.py:72| E:  1, 0: No name 'anchor_tabular' in module 'alibiexplainer' (no-name-in-module)
INFO|2020-05-06T18:04:45|util.py:72| E:  5, 0: No name 'model' in module 'sklearnserver' (no-name-in-module)
INFO|2020-05-06T18:04:45|util.py:72| I: 19, 8: Module 'kfserving' has not 'Storage' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
8d73/src/kubeflow/kfserving/python/alibiexplainer/tests/test_anchor_text.py 
cwd=/mnt/test-data-volume/kubeflow-kfserving-presubmit-e2e-803-493ba35-4881-8d73/src/kubeflow/kfserving/python
INFO|2020-05-06T18:04:38|util.py:61| Subprocess output:

INFO|2020-05-06T18:04:39|util.py:72| Using config file /mnt/test-data-volume/kubeflow-kfserving-presubmit-e2e-803-493ba35-4881-8d73/src/kubeflow/kfserving/python/.pylintrc
INFO|2020-05-06T18:04:39|util.py:72| ************* Module tests.test_anchor_text
INFO|2020-05-06T18:04:39|util.py:72| E:  4, 0: No name 'model' in module 'sklearnserver' (no-name-in-module)

@jinchihe
Copy link
Contributor

@cliveseldon The test-worker has been updated/merged, you can rebase and retry now. Thanks.

@cliveseldon
Copy link
Contributor Author

/retest

1 similar comment
@yuzisun
Copy link
Member

yuzisun commented May 19, 2020

/retest

@@ -70,9 +74,14 @@ def _predict_fn(self, arr: Union[np.ndarray, List]) -> np.ndarray:
return np.array(resp["predictions"])

def explain(self, request: Dict) -> Any:
if self.method is ExplainerMethod.anchor_tabular or self.method is ExplainerMethod.anchor_images or self.method is ExplainerMethod.anchor_text:
if (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

braces ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added by Black linter.

config:
batch_size: "25"
stop_in_first: "True"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any doc links on what this means?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have added link to docs.

@yuzisun
Copy link
Member

yuzisun commented May 26, 2020

Thanks @cliveseldon ! I think this should fix the e2e as well #736.

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuzisun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 7468553 into kserve:master May 26, 2020
2 of 3 checks passed
ellistarn pushed a commit to ellistarn/kfserving that referenced this pull request Jul 28, 2020
* Export LoggerRequest, Fix local logger README

* Update B to Bytes in Logger struct

* Initial update for Alibi 0.4.0

* refactor args parser and add test

* updated samples for explainers

* lint

* linting checks

* more linting

* more linting

* update lint

* lint

* Update imagenet README with link to docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Alibi Explainer Library to 0.4.0
5 participants