Conversation
* feat: add event handler system for message passing procedure
Introduce a new event handler mechanism that allows users to hook into
the message passing procedure via `Event`, `handle_event`, and
`broadcast_event` functions. Events are broadcast before and after
message rule calls, enabling debugging and monitoring capabilities.
Key changes:
- Add `event_handler.jl` with event types and handler interfaces
- Extend `MessageMapping` to include an event handler parameter
- Support both custom handler types and NamedTuple-based handlers
- Add documentation for the events system
- Include comprehensive tests for event handler functionality
* type in docstring
* inject the event handler in the factor node activation options
* make format
* document the existing events better
* rename event handler to callbacks to better match RxInfer
* update docs
* use make format
* fix typo
* allow to merge callbacks
* allow reduce the result of the callbacks
* add per-event callback reducer
* make format
* remove test method
* start reimplement of the product of two messages
this is required to inject the callbacks properly, plus we do the breaking
release already. Could break (and improve) more things as well then
* fix initial integration with RxInfer.jl
* fix Aqua tests
* caught a small bug in RxInfer tests
* caught another bug from RxInfer.jl tests
* merge stricter formatting
* Refactor the variables, add docstrings, add labels
- `compute_product_of_messages` now accepts the `AbstractVariable`,
makes it easier to identify the variable inside the callback
* fix documentation build
* 2prev
* add before/after product of two messages callbacks
* fix failing tests
* add before/after product of messages callbacks. add before/after form constraints
* add before/after marginal compute callbacks
* add error hint in case of wrong passed callbacks
* fix test
* temporary fix for the logscale switch rule
* support Dict as callback handler
* fix warnings in the tests
* make format
* refactor to use an abstract Event{E} structure
* add new method for event_name
* use mutable fields instead
* update CHANGELOG
* Trace ID to link before and after events * Add allocations test * disable some allocation tests on old julia versions * Change sqrt to + and remove version check * only check on julia 1.12 again
* create IDs only if callbacks are set * fix one failing test * make format
* save plan * update * refine the plan * refine plan 2 * implement post_product/post_rule annotations infrastructure * reimplement the memory addon, remove old implementation * commit new file * make format * update plan * refactor the message.jl and message_tests.jl * update marginals.jl and marginal_tests.jl * remove old bridge functions * refactor the rule macro and the rule generating expression * refactor the nodes and tests * fix remaining places where addons were used * fix a lot of tests by hand * fix more tests by hand * update the plan * finish the refactor, update the documentation with migration guide, update CHANGELOG * fix from RxInfer * fix bugs caught in RxInfer * fix documentation build * add pretty output for input argument records * 🤖 Auto-format Julia code (#597) Co-authored-by: bvdmitri <6557701+bvdmitri@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bvdmitri <6557701+bvdmitri@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #600 +/- ##
==========================================
+ Coverage 80.36% 82.02% +1.65%
==========================================
Files 211 208 -3
Lines 6388 6402 +14
==========================================
+ Hits 5134 5251 +117
+ Misses 1254 1151 -103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
This is a pretty huge PR, a lot of files have been touched. I don't feel like asking anyone to review it, especially how much new documentation has been added. All tests pass. I will merge under my responsibility and if you find any new inconsistencies please open new targeted issue |
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
ReactiveMP.jl v6.0 — a major release that overhauls the pipeline/addon system, introduces callbacks, annotations, and a modernized documentation & branding.
Highlights
Callback/Event System
Annotations System (replaces Addons)
API Renames
Documentation & Branding
Other