Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Belief propagation raised a RuntimeWarning #44

Open
ebrocas opened this issue Dec 1, 2023 · 1 comment
Open

Belief propagation raised a RuntimeWarning #44

ebrocas opened this issue Dec 1, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ebrocas
Copy link
Collaborator

ebrocas commented Dec 1, 2023

Hello,

Each time I used qbindiff, I have this warning which is raised, it appears with pip package but also when I have built qbindiff from sources.

As I do not know if this warning is important or note, I cannot propose a patch. But I suppose it should be handled by qbindiff.

[HOME]/.virtualenvs/qbindiff-dev/lib/python3.11/site-packages/qbindiff/matcher/belief_propagation.py:273: RuntimeWarning: overflow encountered in power
  x / (1 + x) for x in np.clip(np.power(math.e, curr_marginals.data), 0, 1e6)

Thanks!

@ebrocas ebrocas added the bug Something isn't working label Dec 1, 2023
@patacca
Copy link
Collaborator

patacca commented Jan 5, 2024

Indeed this an annoying warning that arises from the operation e^x where x is too big. It doesn't cause any error or different behavior since the result of the operation is clipped in the range [0, 1'000'000] but it's still annoying to see every time.
Maybe an idea could be to clip the curr_marginals.data as well to avoid overflowing the data type.
Since this is a critical section it is important that we don't impact the performance in any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants