stan-dev/cmdstanpy

allow iter_warmup when adapt_engaged = False

Closed this issue · 1 comments

Summary:

In the sample() method of a model, if I set adapt_engaged = False and iter_warmup = 1000, I get this message:

ValueError: Argument "adapt_engaged" is False, cannot specify warmup iterations.

We want to allow burnin even without adapting tuning parameters. So we should be able to turn off adaptation and have a non-zero number of warmup iterations.

Current Version:

1.20

Huh, we're doing exactly the wrong thing here, because we also don't assert that num_warmup is nonzero if adaptation is engaged, which means CmdStan throws an unhelpful error rather than us catching it. This has been like this since before CmdStanPy 1.0!