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

Add support for white-box explainers to alibi-explain runtime #1279

Merged
merged 20 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename AlibiExplainSKLearnAPIRuntime to SKLearnRuntime
  • Loading branch information
ascillitoe committed Jul 4, 2023
commit ed0a1b9f880aabf1069e16e705e249bbf8bab0fd
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ class ExplainerDependencyReference:
),
_TREE_SHAP_TAG: ExplainerDependencyReference(
explainer_name=_TREE_SHAP_TAG,
runtime_class=f"{_WHITEBOX_SKLEARN_MODULE}.AlibiExplainSKLearnAPIRuntime",
runtime_class=f"{_WHITEBOX_SKLEARN_MODULE}.SKLearnRuntime",
alibi_class="alibi.explainers.TreeShap",
),
_TREE_PARTIAL_DEPENDENCE_TAG: ExplainerDependencyReference(
explainer_name=_TREE_PARTIAL_DEPENDENCE_TAG,
runtime_class=f"{_WHITEBOX_SKLEARN_MODULE}.AlibiExplainSKLearnAPIRuntime",
runtime_class=f"{_WHITEBOX_SKLEARN_MODULE}.SKLearnRuntime",
alibi_class="alibi.explainers.TreePartialDependence",
),
_TREE_PARTIAL_DEPENDENCE_VARIANCE_TAG: ExplainerDependencyReference(
adriangonz marked this conversation as resolved.
Show resolved Hide resolved
explainer_name=_TREE_PARTIAL_DEPENDENCE_VARIANCE_TAG,
runtime_class=f"{_WHITEBOX_SKLEARN_MODULE}.AlibiExplainSKLearnAPIRuntime",
runtime_class=f"{_WHITEBOX_SKLEARN_MODULE}.SKLearnRuntime",
alibi_class="alibi.explainers.PartialDependenceVariance",
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from mlserver_alibi_explain.explainers.white_box_runtime import AlibiExplainWhiteBoxRuntime


class AlibiExplainSKLearnAPIRuntime(AlibiExplainWhiteBoxRuntime):
class SKLearnRuntime(AlibiExplainWhiteBoxRuntime):
"""
Runtime for white-box explainers that require access to a tree-based model matching the SKLearn API, such as
a sklearn, XGBoost, or LightGBM model. Example explainers include TreeShap and TreePartialDependence.
Expand Down
Loading