Feature/issue 2814 warmup auto
Submisison Checklist
- [ ] Run tests:
./runCmdStanTests.py src/test - [x] Declare copyright holder and open-source license: see below
Summary:
This is the interface component to https://github.com/stan-dev/stan/issues/2814
Intended Effect:
Make the automatically chosen metric work with cmdstan!
How to Verify:
Any model built with this cmdstan can now use the 'auto_e' metric.
./model sample algorithm=hmc metric=auto_e
And that'll run and print some stuff out. Currently your output might look something like this:
Iteration: 1 / 2000 [ 0%] (Warmup)
Iteration: 100 / 2000 [ 5%] (Warmup)
adapt: 99, which: dense, max: 12.7748
adapt: 99, which: diag, max: 999.44
adapt: 149, which: dense, max: 15.916
adapt: 149, which: diag, max: 752.325
Iteration: 200 / 2000 [ 10%] (Warmup)
adapt: 249, which: dense, max: 11.4019
adapt: 249, which: diag, max: 587.708
Iteration: 300 / 2000 [ 15%] (Warmup)
Iteration: 400 / 2000 [ 20%] (Warmup)
adapt: 449, which: dense, max: 12.8718
adapt: 449, which: diag, max: 1072.26
Iteration: 500 / 2000 [ 25%] (Warmup)
Iteration: 600 / 2000 [ 30%] (Warmup)
Iteration: 700 / 2000 [ 35%] (Warmup)
Iteration: 800 / 2000 [ 40%] (Warmup)
Iteration: 900 / 2000 [ 45%] (Warmup)
adapt: 949, which: dense, max: 11.2085
adapt: 949, which: diag, max: 1235.64
Iteration: 1000 / 2000 [ 50%] (Warmup)
Iteration: 1001 / 2000 [ 50%] (Sampling)
Iteration: 1100 / 2000 [ 55%] (Sampling)
Iteration: 1200 / 2000 [ 60%] (Sampling)
Iteration: 1300 / 2000 [ 65%] (Sampling)
Iteration: 1400 / 2000 [ 70%] (Sampling)
Iteration: 1500 / 2000 [ 75%] (Sampling)
Iteration: 1600 / 2000 [ 80%] (Sampling)
Iteration: 1700 / 2000 [ 85%] (Sampling)
Iteration: 1800 / 2000 [ 90%] (Sampling)
Iteration: 1900 / 2000 [ 95%] (Sampling)
Iteration: 2000 / 2000 [100%] (Sampling)
The extra output (stuff starting with "adapt") is something I want to talk to the reviewer about (do we need any extra output? Is this the right output). Right now the results of computing the selection criteria from the paper are being printed. Smaller is better, and the adaptation will use for the next sampling stage whichever of the two metrics had a lower value.
Side Effects:
Hopefully none
Documentation:
None yet!
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Columbia University
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
@bbbales2 does this branch work? I could test this via cmdstanr
as I recall there is a corresponding cmdstan branch. With that it should work, but let's wait for @bbbales2 .
as I recall there is a corresponding cmdstan branch. With that it should work
@wds15 I guess you missed that this specific pull request is for merging that specific cmdstan branch. Based on this pull request this branch has not been touched since early September, so I doubt that this works. I decided to ask Ben here since even git clone for the branch associated to the pull request wasn't able to do recursive cloning.
@avehtari whoops, looks like I put the Stan branch on my fork of Stan
This should get you what you need:
git clone --recursive https://github.com/stan-dev/cmdstan.git cmdstan-auto
cd cmdstan-auto
git checkout feature/issue-2814-warmup-auto
cd stan
git remote add bbbales2 https://github.com/bbbales2/stan.git
git fetch bbbales2
cd ../
make stan-update