cmdstan icon indicating copy to clipboard operation
cmdstan copied to clipboard

diagnose counting warmup draws

Open bbbales2 opened this issue 5 years ago • 1 comments

Summary:

make examples/bernoulli/bernoulli
examples/bernoulli/bernoulli sample save_warmup=1 data file=examples/bernoulli/bernoulli.data.R output file=output.csv

Edit output.csv and add a divergence to the post warmup samples. (here's one: output.csv.txt)

bin/diagnose output.csv

The output will include:

Checking sampler transitions for divergences.
1 of 2000 (0.05%) transitions ended with a divergence.

There is 1 divergence (we added it -- there should be a bunch during warmup), but there are only 1000 post warmup draws.

Current Version:

v2.25.0

bbbales2 avatar Nov 20 '20 19:11 bbbales2

the diagnose command depends on stan::mcmc::chains went spelunking through the logic, and while only the sampling draws from the csv file are analyzed, there's a bunch of logic that looks at the CSV header and if save_warmup is specified, it uses that somehow.

most def a bug - if not a bug, some programmer's random brain fart - not going to git blame to find out who farted.

mitzimorris avatar Nov 20 '20 19:11 mitzimorris