Skip to content

Conversation

Noricc
Copy link
Contributor

@Noricc Noricc commented Jun 25, 2025

The minimum of the OrderedLogistic distribution is supposed to be 1, not 0. This is consistent with the documentation, and the behavior of the distribution when using rand().

Fixes bug #2602

The minimum of the OrderedLogistic function is supposed to be 1, not 0.
This is consistent with the documentation, and the behavior of the
distribution when using rand().
@penelopeysm
Copy link
Member

That's great, thanks! Could I trouble you to add a test to test/stdlib/distributions.jl (not sure exactly what to test, maybe that logpdf of the support adds up to 1?)

@Noricc
Copy link
Contributor Author

Noricc commented Jun 25, 2025

I can try later today!

We add the test that the support should have the right number of
elements, and that the probabilities add up to 1.0.
@Noricc
Copy link
Contributor Author

Noricc commented Jun 25, 2025

Added a test now.

@penelopeysm
Copy link
Member

Wonderful, thank you for the great work @Noricc! I'll just bump the patch so that we can release, then will merge once CI is happy.

@penelopeysm penelopeysm force-pushed the orderedlogistic-fix branch from 863acef to 2a2bd6b Compare June 26, 2025 10:50
@penelopeysm penelopeysm enabled auto-merge June 26, 2025 10:51
Copy link

codecov bot commented Jun 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.57%. Comparing base (7ebde76) to head (2a2bd6b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/stdlib/distributions.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2603   +/-   ##
=======================================
  Coverage   85.57%   85.57%           
=======================================
  Files          22       22           
  Lines        1456     1456           
=======================================
  Hits         1246     1246           
  Misses        210      210           

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

@penelopeysm penelopeysm added this pull request to the merge queue Jun 26, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 15899880826

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.636%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/stdlib/distributions.jl 0 1 0.0%
Totals Coverage Status
Change from base Build 15765001949: 0.0%
Covered Lines: 1246
Relevant Lines: 1455

💛 - Coveralls

Merged via the queue into TuringLang:main with commit 97c3bc7 Jun 26, 2025
32 of 33 checks passed
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.

3 participants