Skip to content

Fix: weibull default space - #307

Open
docxology wants to merge 3 commits into
ReactiveBayes:mainfrom
docxology:fix/weibull-default-space
Open

Fix: weibull default space#307
docxology wants to merge 3 commits into
ReactiveBayes:mainfrom
docxology:fix/weibull-default-space

Conversation

@docxology

Copy link
Copy Markdown
Contributor

[Verified audit fix] — branch fix/weibull-default-space.

Commit: fix(Weibull): repair DefaultParametersSpace helpers

Changes

src/distributions/weibull.jl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Verification

Confirmed against main in the ReactiveBayes audit (Julia 1.12.6); sources verified read-only. See the branch diff.

docxology and others added 2 commits August 1, 2026 17:31
- getlogpartition: return scalar k*log(λ) - log(k) (was wrong-valued 1-vector k/λ)
- getgradlogpartition: use closure arg λ (was undefined η1); correct to k/λ
Assert the default-space log-partition is a scalar equal to natural-space
(k·log λ − log k) and the gradient no longer crashes, matching ForwardDiff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bvdmitri

bvdmitri commented Sep 2, 2026

Copy link
Copy Markdown
Member

Confirmed. The default gradient referenced an undefined η1 (crash), and the default log-partition returned SA[k/λ] — wrong value and a non-scalar — instead of k·log λ − log k. Both fixes are correct. Pushed a regression test asserting the log-partition is scalar, equals natural-space, and the gradient matches ForwardDiff.

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.06%. Comparing base (a72e447) to head (53e0a6d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #307      +/-   ##
==========================================
+ Coverage   83.91%   84.06%   +0.14%     
==========================================
  Files          45       45              
  Lines        4078     4078              
==========================================
+ Hits         3422     3428       +6     
+ Misses        656      650       -6     

☔ View full report in Codecov by Harness.
📢 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.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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