StatsFuns.jl icon indicating copy to clipboard operation
StatsFuns.jl copied to clipboard

random `betalogpdf` failure

Open ArnoStrouwen opened this issue 1 year ago • 1 comments

This popped up in a PR completely unrelated to beta distribution.

test_frule: betalogpdf on Float64,Float64,Float64: Test Failed at C:\Users\runneradmin\.julia\packages\ChainRulesTestUtils\Ko1Wr\src\check_result.jl:24
  Expression: isapprox(actual, expected; kwargs...)
   Evaluated: isapprox(-55.931256635907275, NaN; rtol = 1.0e-9, atol = 1.0e-9)

Went away after rerunning the test.

ArnoStrouwen avatar Mar 20 '25 20:03 ArnoStrouwen

ChainRules tests are generally a bit sensitive with respect to the (random) inputs, I've seen random test failures in StatsFuns but in other repos as well. We could easily avoid this by setting a seed in the tests. I wonder, however, if there's a numerical instability in the ChainRules definition here that's to blame, and whether we could fix it. Would be a bit easier to judge if the ChainRules tests would print the failing inputs...

devmotion avatar Mar 21 '25 09:03 devmotion