Skip to content

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

Closed
bvdmitri wants to merge 31 commits intomainfrom
callbacks
Closed

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

Conversation

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

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 93.02326% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.66%. Comparing base (dc924fe) to head (1c08d09).

Files with missing lines Patch % Lines
src/message.jl 90.69% 4 Missing ⚠️
src/nodes/predefined/delta/delta.jl 0.00% 1 Missing ⚠️
src/variables/data.jl 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
+ Coverage   80.36%   80.66%   +0.29%     
==========================================
  Files         211      212       +1     
  Lines        6388     6435      +47     
==========================================
+ Hits         5134     5191      +57     
+ Misses       1254     1244      -10     

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

this is required to inject the callbacks properly, plus we do the breaking
release already. Could break (and improve) more things as well then
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #581 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #581 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #581 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #581 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #581 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.

- `compute_product_of_messages` now accepts the `AbstractVariable`,
  makes it easier to identify the variable inside the callback
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #586 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #586 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #586 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #586 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #586 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #586 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #586 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
Copy Markdown
Contributor

🤖 Code Formatting

Your PR still has some code formatting issues. I've updated PR #586 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.

@bvdmitri
Copy link
Copy Markdown
Member Author

I will close for now as the spam from formatter is a bit annoying

@bvdmitri bvdmitri closed this Mar 19, 2026
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