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

Fix the overflow issue in probability #78

Merged
merged 5 commits into from
Sep 24, 2023
Merged

Fix the overflow issue in probability #78

merged 5 commits into from
Sep 24, 2023

Conversation

GiggleLiu
Copy link
Member

@GiggleLiu GiggleLiu commented Sep 23, 2023

fix #77

The overflow issue has been seriously handled in this package by RescaledArray. However, when calling probability, we have to returns the exponentiated value, which causes the overflow in tests.
To avoid potential overflow, we added the logged version of this API:

julia> log_probability(tn)

It will return the logged value of the probability (or partition function), hence does not overflow.

@GiggleLiu GiggleLiu requested a review from mroavi September 23, 2023 13:32
@codecov
Copy link

codecov bot commented Sep 23, 2023

Codecov Report

Merging #78 (a1100ad) into main (83ee4e7) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   84.61%   84.70%   +0.08%     
==========================================
  Files          10       10              
  Lines         533      536       +3     
==========================================
+ Hits          451      454       +3     
  Misses         82       82              
Files Changed Coverage Δ
src/mar.jl 94.54% <ø> (ø)
src/Core.jl 79.36% <100.00%> (+1.03%) ⬆️

@GiggleLiu
Copy link
Member Author

A quick update:
The doc building issue is related to: JuliaDocs/Documenter.jl#2194

There are two types of errors relevant.

  • one is related to incorrect ref, which has been resolved.
  • the other is the missing docs, I ignored this type of error by adding keyword argument warnonly=:missing_docs in the makedocs function.

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.

Arithmetic overflow or underflow when solving PR tasks
2 participants