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

Split Explainer into Base & Explainer #649

Merged
merged 3 commits into from May 4, 2022

Conversation

RobertSamoilescu
Copy link
Collaborator

@RobertSamoilescu RobertSamoilescu commented May 3, 2022

This PR splits the Explainer class into a Base and Explainer.
The Base class currently implements a structured approach to handle metadata (to be extended). This split allows us to introduce other base classes for new packages that do not conform to the Explainer interface. For example, algorithms for prototype selection are not explainers. Calling the explain method when, in fact, they are summarizing/distilling the dataset is not appropriate. Furthermore, functionalities such as saving and loading might expect other arguments, and resetting the prediction might not apply.

Possible to be used for the confidence package too.

Observation. The functionality of the Explanation class is already quite general and works for all packages. Changing the name to something more general would involve a lot of refactoring, which we don’t want to do, at least for now.

@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #649 (f591958) into master (41db95e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head f591958 differs from pull request most recent head 9671d35. Consider uploading reports for the commit 9671d35 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #649   +/-   ##
=======================================
  Coverage   80.45%   80.46%           
=======================================
  Files          77       77           
  Lines       10634    10635    +1     
=======================================
+ Hits         8556     8557    +1     
  Misses       2078     2078           
Impacted Files Coverage Δ
alibi/api/interfaces.py 90.58% <100.00%> (+0.11%) ⬆️

"""

meta: dict = attr.ib(default=attr.Factory(default_meta), repr=alibi_pformat) #: Explainer meta-data.
Copy link
Member

Choose a reason for hiding this comment

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

Explainer -> Object / Algorithm?

@RobertSamoilescu RobertSamoilescu merged commit a3d9023 into SeldonIO:master May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants