Skip to content

Release 6#600

Merged
bvdmitri merged 36 commits into
mainfrom
release-6
Apr 17, 2026
Merged

Release 6#600
bvdmitri merged 36 commits into
mainfrom
release-6

Conversation

@bvdmitri
Copy link
Copy Markdown
Member

Summary

ReactiveMP.jl v6.0 — a major release that overhauls the pipeline/addon system, introduces callbacks, annotations, and a modernized documentation & branding.

Highlights

  • New Stream Postprocessor Abstraction
  • Replaces the old AbstractPipelineStage hierarchy with AbstractStreamPostprocessor, unifying outbound message, marginal, and score stream postprocessing under a single concept
  • ScheduleOnStreamPostprocessor supersedes ScheduleOnPipelineStage and per-node schedulers
  • CompositeStreamPostprocessor for chaining postprocessors
    Callback/Event System
  • Hook into message passing steps: rule calls, message products, form constraints, marginal computation
  • MessageProductContext bundles product computation settings and callbacks
    Annotations System (replaces Addons)
  • AnnotationDict, LogScaleAnnotations, InputArgumentsAnnotations replace AddonLogScale, AddonMemory, AddonDebug
  • @Logscale macro for setting log-scale annotations inside @rule bodies
  • getannotations replaces getaddons; Message/Marginal type parameters simplified
    API Renames
  • messagein/messageout → get_stream_of_inbound_messages/get_stream_of_outbound_messages
  • getmarginal/getprediction → get_stream_of_marginals/get_stream_of_predictions
  • setmarginal!/setmessage! → set_initial_marginal!/set_initial_message!
  • update! → new_observation!
  • MarginalSkipStrategy hierarchy → skip_initial(), skip_clamped(), skip_clamped_and_initial() filter operators
    Documentation & Branding
  • New concepts pages: factor graphs, message passing, reactive programming, inference lifecycle
  • Expanded library documentation for variables, nodes, messages, marginals
  • New documentation pages for stream postprocessors and callbacks
  • Migration guide for v5 → v6
  • Project logo and updated README

Other

  • Variable labels for RandomVariable, ConstVariable, DataVariable
  • create_new_stream_of_inbound_messages! for per-connection message streams
  • get_stream_of_predictions/set_stream_of_predictions! accessors
  • Switched from ReTestItems to TestItemRunner

bvdmitri and others added 30 commits March 20, 2026 15:14
* 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
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 74.23664% with 135 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.02%. Comparing base (40dcad2) to head (1397d29).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/nodes/predefined/delta/layouts/default.jl 0.00% 24 Missing ⚠️
src/message.jl 85.71% 10 Missing ⚠️
src/postprocessors.jl 16.66% 10 Missing ⚠️
src/score/node.jl 0.00% 9 Missing ⚠️
...t/ReactiveMPProjectionExt/layout/cvi_projection.jl 0.00% 7 Missing ⚠️
src/nodes/predefined/delta/delta.jl 0.00% 7 Missing ⚠️
src/nodes/predefined/distribution/distribution.jl 0.00% 7 Missing ⚠️
src/variables/data.jl 74.07% 7 Missing ⚠️
src/nodes/predefined/delta/layouts/cvi.jl 0.00% 6 Missing ⚠️
src/nodes/predefined/mixture.jl 14.28% 6 Missing ⚠️
... and 17 more
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bvdmitri
Copy link
Copy Markdown
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

@bvdmitri bvdmitri merged commit f46afbf into main Apr 17, 2026
8 of 9 checks passed
@bvdmitri bvdmitri deleted the release-6 branch April 17, 2026 11:44
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.

2 participants