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

document design practice #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
16 changes: 16 additions & 0 deletions explainers/doc/MLI_BYORS_DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ MLI module of Driverless AI uses the concept of **recipes** so that users can ad
* [Safety](#safety)
* [Security](#security)
* [Versioning](#versioning)
* [Dependable](#dependable)
* [Explainer Examples](#explainer-examples)
* [Hello world!](#hello-world)
* [Logging Example](#logging-example)
Expand Down Expand Up @@ -2953,6 +2954,21 @@ class ExampleVersionExplainer_v2_1(CustomExplainer):
```

This will create a new explainer with save new name and both explainer versions may coexist.
## Dependable
In practice, explainer class should be self-contained without having
a high degree of coupling with external modules such that can be more plugable and replaceable.
However, the downside of the approach is explainer class can become less cohesive and
lead to higher complexity which can brought challenges to future extend/change.
Therefore, the trade-off should be considered thoughtfully in the design stage.

Currently, one exception is Shapley explainers including:
- [Transformed Shapley explainer](https://github.com/h2oai/h2oai/blob/dev/h2oaicore/mli/byor/recipes/transformed_shapley_explainer.py)
- [Naive Shapley explainer](https://github.com/h2oai/h2oai/blob/dev/h2oaicore/mli/byor/recipes/original_contrib_explainer.py)
- [Naive Summary Shapley explainer](https://github.com/h2oai/h2oai/blob/dev/h2oaicore/mli/byor/recipes/shapley_summary_explainer.py)

Above explainers have a high degree of coupling with [Shapley utils](https://github.com/h2oai/h2oai/blob/dev/h2oaicore/mli/byor/mli_shapley_utils.py)
to compute on-demand Shapleys and predictions, any modifications in [Shapley utils](https://github.com/h2oai/h2oai/blob/dev/h2oaicore/mli/byor/mli_shapley_utils.py)
should be well designed and should be changed with minimal scopes as only needed.
Copy link
Contributor

Choose a reason for hiding this comment

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

How would a user know how to import such dependencies? Wouldn't an example be needed here? Or am I missing something?

# Explainer Examples
Examples of simple explainers which demonstrate explainer
features.
Expand Down