TuringLang / AbstractMCMC.jl

Abstract types and interfaces for Markov chain Monte Carlo methods
https://turinglang.org/AbstractMCMC.jl
MIT License
87 stars 18 forks source link

Check if the number of chains is greater than the number of samples per chain #36

Closed devmotion closed 4 years ago

devmotion commented 4 years ago

On Slack it was suggested that it might be helpful if users are presented with a warning if they (probably unintentionally) specify more chains than number of samples in parallel sampling.

In general, I think the problem indicates that maybe both the number of samples and number chains should be keyword arguments (they are not used for dispatching and I can hardly imagine any downstream code would want to dispatch on them). We could present the warning for now and keep this in mind/include it in the next breaking release.

codecov[bot] commented 4 years ago

Codecov Report

Merging #36 into master will increase coverage by 0.08%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   97.45%   97.54%   +0.08%     
==========================================
  Files           5        5              
  Lines         118      122       +4     
==========================================
+ Hits          115      119       +4     
  Misses          3        3              
Impacted Files Coverage Δ
src/sample.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c92a866...db8ac11. Read the comment docs.