feat: explainability (permutation + SHAP) and integrity fixes#9
Merged
Conversation
added 2 commits
June 25, 2026 19:45
…ixes Explainability (new domain module, hexagonal): - ExplainerPort + typed GlobalExplanation/LocalExplanation - PermutationImportanceExplainer (dependency-free default) + ShapExplainer (optional 'explain' extra: global + local attributions) - ExplainabilityAutoConfiguration (SHAP when installed, else permutation) - AutoMLResult.explain() + DI wiring via AutoML.from_context - 4 real-data TDD tests (signal>noise, AutoML integration, DI, SHAP) - docs/explainability.md (real permutation-importance output) + nav/home cards Integrity / no-fake-data fixes (from a full-codebase gap audit): - plain AutoML() now includes installed XGBoost/LightGBM/CatBoost by default, matching the documented '+boosting when installed' (TDD) - security.md: sandbox tiers (docker/e2b), timeout_seconds and HITL approval marked as declared-config/roadmap (only static-analysis + restricted exec are enforced today); cost-benefit gate corrected to a post-hoc measured-lift filter - README: list real adapters vs reference/planned (AutoGluon/Feast/BentoML) Real-LLM path verified end-to-end (Claude haiku-4-5): gate accepts measured-lift features, rejects the rest; agentic loop verifies 9 attempts.
- AdapterUnavailableError(adapter, extra) two-arg form; shap import marked type-ignore[import-not-found] (CI doesn't install the explain extra) - cast untyped sklearn permutation_importance / shap returns to Any - apply ruff format
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.
First verified increment from a full-codebase gap audit (95 gaps found; this PR delivers the flagship feature + the highest-impact integrity fixes). Everything here is tested on real data — no fakes.
Explainability (new hexagonal module — the headline gap)
ExplainerPort+ typedGlobalExplanation/LocalExplanation.PermutationImportanceExplainer— dependency-free default (scikit-learn).ShapExplainer— optionalexplainextra; global + local (per-prediction) attributions.ExplainabilityAutoConfiguration— SHAP when the extra is installed, else permutation.AutoMLResult.explain(dataset)+ DI wiring viaAutoML.from_context.docs/explainability.mdwith real permutation-importance output + nav/homepage cards.Integrity fixes (so the docs match the code — "no fake data")
AutoML()now includes installed XGBoost/LightGBM/CatBoost by default, matching the documented "+ boosting when installed" (previously only the DI/agentic path did). TDD-covered.docker/e2b),timeout_seconds, and HITLrequire_approvalare now clearly marked declared-config / roadmap — only Layers 1–2 (static analysis + restricted in-process exec) are enforced today. The cost-benefit gate is corrected to a post-hoc measured-lift filter (it was described as a pre-call budget governor;budget_usdis not yet enforced).Verified for real
mkdocs build --strictclean.haiku-4-5): GenAI feature engineering accepted measured-lift features and rejected the rest; the agentic loop verified 9 attempts.Not in this PR (tracked backlog, next increments)
Calibration · stacking · pluggable CV (stratified/group/time) · class-imbalance + PR-AUC · drift/monitoring · fairness/bias · model cards · CLI train/predict/explain · data profiling · wiring GenAI feature-engineering into
AutoML.fit· actually enforcing the sandbox/approval tiers.