Skip to content

Implement events and event handlers (similar to RxInfer)#575

Draft
bvdmitri wants to merge 14 commits intomainfrom
callbacks
Draft

Implement events and event handlers (similar to RxInfer)#575
bvdmitri wants to merge 14 commits intomainfrom
callbacks

Conversation

@bvdmitri
Copy link
Member

@bvdmitri bvdmitri commented Mar 9, 2026

This (draft) PR implements events and event handlers, which would be useful to observe the inference procedure inside ReactiveMP. Part of ReactiveBayes/RxInfer.jl#566

bvdmitri added 2 commits March 5, 2026 15:15
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
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #576 with the necessary formatting changes.

You can merge that PR into this branch to fix the code style check.

Alternatively, you can run make format locally and push the changes yourself.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #576 with the necessary formatting changes.

You can merge that PR into this branch to fix the code style check.

Alternatively, you can run make format locally and push the changes yourself.

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 40.00000% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.33%. Comparing base (3b97062) to head (99fc25e).

Files with missing lines Patch % Lines
src/nodes/predefined/delta/layouts/default.jl 0.00% 14 Missing ⚠️
...t/ReactiveMPProjectionExt/layout/cvi_projection.jl 0.00% 8 Missing ⚠️
src/nodes/predefined/delta/layouts/cvi.jl 0.00% 8 Missing ⚠️
src/nodes/predefined/delta/delta.jl 0.00% 5 Missing ⚠️
src/message.jl 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
+ Coverage   80.28%   80.33%   +0.04%     
==========================================
  Files         211      212       +1     
  Lines        6265     6285      +20     
==========================================
+ Hits         5030     5049      +19     
- Misses       1235     1236       +1     

☔ 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.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #577 with the necessary formatting changes.

You can merge that PR into this branch to fix the code style check.

Alternatively, you can run make format locally and push the changes yourself.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #577 with the necessary formatting changes.

You can merge that PR into this branch to fix the code style check.

Alternatively, you can run make format locally and push the changes yourself.

@github-actions
Copy link
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #578 with the necessary formatting changes.

You can merge that PR into this branch to fix the code style check.

Alternatively, you can run make format locally and push the changes yourself.

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.

1 participant