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

Best practices on managing state during explain calls #453

Open
jklaise opened this issue Jul 15, 2021 · 1 comment
Open

Best practices on managing state during explain calls #453

jklaise opened this issue Jul 15, 2021 · 1 comment
Assignees
Labels
internal-mle Priority: Medium Type: Maintenance Anything to do with library maintenance (CI, linting, refactoring etc.)

Comments

@jklaise
Copy link
Contributor

jklaise commented Jul 15, 2021

Currently we don't have guidelines for how to manage the state of an explainer object, especially during explain calls. An explain method may be very complex internally, calling a bunch of different methods or functions, so state is often set using various attributes to keep track of calculation results. However, this can be problematic for several reasons:

  • The attribute names are not consistent, it is not clear what is meant to be public/private or what is set during initialization or fit vs explain.
  • Any state set (and not cleared) during explain will by definition be related to something we just finished explaining, so it doesn't feel right to hold onto this state after explain call finishes
  • Arbitrary state can introduce difficulties serializing the explainer.

On the other hand, it's not clear what the best patterns of managing state in explainer objects could be. A broader move towards functional programming patterns may help.

@jklaise jklaise added Type: Maintenance Anything to do with library maintenance (CI, linting, refactoring etc.) internal-mle Priority: Medium labels Jul 15, 2021
@jklaise jklaise changed the title Best practices on setting state during explain calls Best practices on managing state during explain calls Jul 15, 2021
@adriangonz adriangonz self-assigned this Jul 28, 2021
@adriangonz
Copy link

Following the initial exploration done in PR #460, we identified that this task may need a explainer-by-explainer approach. Therefore, we've decided to split this into smaller tasks to assess how this can be done for each explainer.

Based on the above, this task also includes now #462 and #463 as sub-tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-mle Priority: Medium Type: Maintenance Anything to do with library maintenance (CI, linting, refactoring etc.)
Projects
None yet
Development

No branches or pull requests

2 participants