flatironinstitute / bayes-kit

Bayesian inference and posterior analysis for Python
MIT License
43 stars 3 forks source link

Testing: Update Binomial model #20

Closed WardBrian closed 1 year ago

WardBrian commented 1 year ago

This PR fixes the issues discovered in #18, namely:

  1. Gives a better name for the model
  2. Adds a constraining transform and jacobian adjustment so that theta can be sampled over all of $\mathcal{R}$
  3. Adds back tests with HMC and MALA (which seem to be much more solid in my runs so far)
WardBrian commented 1 year ago

Of course it passes 20 times in a row locally and fails on the 3rd chance it gets in CI. Oh the joys of stochastic testing

codecov-commenter commented 1 year ago

Codecov Report

Merging #20 (e3a6168) into main (40a3412) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #20      +/-   ##
==========================================
+ Coverage   95.71%   95.73%   +0.01%     
==========================================
  Files           9        9              
  Lines         257      258       +1     
==========================================
+ Hits          246      247       +1     
  Misses         11       11              
Impacted Files Coverage Δ
bayes_kit/__init__.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

bob-carpenter commented 1 year ago

We need to do better stochastic testing. We either need to retry tests or we need to set tighter thresholds. For some of these, we could estimate our tolerances within the error of our ESS estimates.

WardBrian commented 1 year ago

I think this is ready to merge