Add model specific explainer compatibility and inherited compatibility resolution#767
Draft
Irozuku wants to merge 4 commits into
Draft
Add model specific explainer compatibility and inherited compatibility resolution#767Irozuku wants to merge 4 commits into
Irozuku wants to merge 4 commits into
Conversation
…del-compatibility
…del-compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Explainers were associated only to tasks, wrongly assuming every explainer is model agnostic. This PR establishes the compatibility semantics: an explainer declaring a task in
COMPATIBLE_COMPONENTSis model agnostic for that task, while a model declaring an explainer's name in its ownCOMPATIBLE_COMPONENTSunlocks that model specific explainer. The registry mergesCOMPATIBLE_COMPONENTSacross the class hierarchy so declarations on shared bases (e.g.SklearnLikeClassifier) propagate to every subclass, and the frontend offers the union of task related and model related explainers for the run's model.Type of Change
Changes (by file)
DashAI/back/dependencies/registry/component_registry.py:_collect_compatible_components()unions each class's ownCOMPATIBLE_COMPONENTSalong the MRO (deduplicated), used by bothregister_componentandunregister_component, so mixins and base classes compose instead of the first declaration shadowing the rest.DashAI/front/src/components/explainers/SetNameAndExplainerStep.jsx: fetches task related plus model related explainers in parallel and deduplicates by name.DashAI/front/src/components/models/RunResults.jsx,explainers/{InlineExplainerCreator,NewGlobalExplainerModal,NewLocalExplainerModal}.jsx: threadmodelName(run.model_name) into the creation flow.tests/back/registries/test_registry.py: MRO merge coverage (mixin + base + subclass redeclaration deduplicates; unregister removes inherited edges symmetrically).Testing
Notes