Skip to content

Refactor SmartExplainer facade and move compute logic to Explainer - #746

Open
guillaume-vignal wants to merge 7 commits into
MAIF:masterfrom
guillaume-vignal:feature/smartexplainer_refacto
Open

Refactor SmartExplainer facade and move compute logic to Explainer#746
guillaume-vignal wants to merge 7 commits into
MAIF:masterfrom
guillaume-vignal:feature/smartexplainer_refacto

Conversation

@guillaume-vignal

Copy link
Copy Markdown
Collaborator

Summary

This PR addresses issue #745 by separating concerns between the user-facing facade and compute internals:

  • Keep SmartExplainer as the public entrypoint/facade.
  • Move and centralize compute/state logic into a dedicated Explainer class.
  • Simplify SmartExplainer by removing redundant compute wrappers and relying on delegation.
  • Improve type hints and align signatures with actual runtime behavior.

Closes #745.

Main changes

  • Added compute engine class:
    • shapash/explainer/explainer.py
  • Refactored facade/orchestration:
    • shapash/explainer/smart_explainer.py

@guillaume-vignal guillaume-vignal self-assigned this Jul 24, 2026
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.

SmartExplainer has mixed responsibilities (API + compute), making maintenance and typing difficult

1 participant