Repository navigation
Conversation
Replace signature inference with event-to-callable mappings and update callback documentation, examples, and regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cddaf74d-b4ad-4361-8299-f2f779330d5a
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #695 +/- ##
==========================================
- Coverage 67.32% 67.29% -0.03%
==========================================
Files 77 77
Lines 11739 11707 -32
==========================================
- Hits 7903 7878 -25
+ Misses 3836 3829 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused API change has consistent validation, migrated callers, and regression coverage, with no unresolved findings.
No open issues 🎉
What changed in this PR
Replaces EBM callback signature inference with explicit event-to-callable mappings, updating tests and documentation for the new contract.
Changes:
- Validates event names and callable values without inspecting signatures.
- Migrates callback tests and adds coverage for flexible handlers.
- Documents callback registration, return actions, and parallel-state behavior.
| File | Description |
|---|---|
| python/interpret-core/tests/glassbox/ebm/test_merge_ebms.py | Migrates merge callback test to mapping syntax. |
| python/interpret-core/tests/glassbox/ebm/test_ebm.py | Updates timer callback registration. |
| python/interpret-core/tests/glassbox/ebm/test_callback.py | Expands mapping validation and handler coverage. |
| python/interpret-core/interpret/glassbox/_ebm.py | Implements explicit mappings and updates estimator docstrings. |
| python/interpret-core/interpret/glassbox/_ebm_core/_merge_ebms.py | Clarifies callback cleanup comments only. |
| docs/interpret/python/api/ExplainableBoostingRegressor.ipynb | Renders canonical regressor documentation alongside the alias. |
| docs/interpret/python/api/ExplainableBoostingClassifier.ipynb | Renders canonical classifier documentation alongside the alias. |
| docs/interpret/hyperparameters.md | Adds callback usage and behavior guidance. |
| docs/benchmarks/ebm-benchmark.ipynb | Updates timer handler and commented registration example. |
Review effort: Balanced
This branch has not been deployed
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
Replace callback signature autodetection with an explicit event-to-callable mapping:
"examine","boost", and"interaction"keys; validate names and callable values.Noneand empty mappings disable callbacks.**kwargshandlers, forwarding wrappers, partials (includingupdate_wrapper), mocks, built-ins, and a shared handler registered for multiple events.Documentation
Validation
EBMModel, classifier, and regressor coverage. The related short/long callback and merge-callback cases also passed.--warningiserrorexits nonzero on 10 code-highlighting warnings in unchanged example notebooks. No warnings were emitted for the updated callback documentation.