next Stan version: v2.12

82 views
Skip to first unread message

Daniel Lee

unread,
Aug 28, 2016, 5:14:50 PM8/28/16
to stan-dev mailing list
Looks like we've got a lot of bug fixes stacked up and ready to go. When do we want to release?


Daniel

Ben Goodrich

unread,
Aug 28, 2016, 5:56:15 PM8/28/16
to stan development mailing list
On Sunday, August 28, 2016 at 5:14:50 PM UTC-4, Daniel Lee wrote:
Looks like we've got a lot of bug fixes stacked up and ready to go. When do we want to release?

Soon if you are going to use it in Paris. Probably need a week for StanHeaders and rstan binaries to be built.


Daniel Lee

unread,
Sep 1, 2016, 9:23:43 PM9/1/16
to stan-dev mailing list
Hi all,

There are just a couple more things that we need before we can release Stan:

Math Library:
- nothing outstanding.

Stan Library:
- Bug fix for ternary operator: https://github.com/stan-dev/stan/pull/2046 We should be able to tag this tonight / tomorrow.


There are a few more pull requests that are out now and we can merge them if we have time.

Unless anyone objects, I can tag the math library and stan library either tomorrow or perhaps Monday.



Daniel



--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bob Carpenter

unread,
Sep 2, 2016, 7:27:17 AM9/2/16
to stan...@googlegroups.com
Sounds good. Looks like you merged the ternary op fix already,
so I think we're good to go.

Thanks!

- Bob
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.

Daniel Lee

unread,
Sep 2, 2016, 12:58:26 PM9/2/16
to stan-dev mailing list
Yup. I don't see anything else holding us up. I'll start writing the release notes. (If anyone writes it up before I finish it out, just email me. I tend to update the file with the tagging process.)

On Fri, Sep 2, 2016 at 7:26 AM, Bob Carpenter <ca...@alias-i.com> wrote:
Sounds good.  Looks like you merged the ternary op fix already,
so I think we're good to go.

Thanks!

- Bob

> On Sep 2, 2016, at 3:23 AM, Daniel Lee <bea...@alum.mit.edu> wrote:
>
> Hi all,
>
> There are just a couple more things that we need before we can release Stan:
>
> Math Library:
> - nothing outstanding.
>
> Stan Library:
> - Bug fix for ternary operator: https://github.com/stan-dev/stan/pull/2046 We should be able to tag this tonight / tomorrow.
>
>
> There are a few more pull requests that are out now and we can merge them if we have time.
>
> Unless anyone objects, I can tag the math library and stan library either tomorrow or perhaps Monday.
>
>
>
> Daniel
>
>
>
> On Sun, Aug 28, 2016 at 5:56 PM, Ben Goodrich <goodri...@gmail.com> wrote:
> On Sunday, August 28, 2016 at 5:14:50 PM UTC-4, Daniel Lee wrote:
> Looks like we've got a lot of bug fixes stacked up and ready to go. When do we want to release?
>
> Soon if you are going to use it in Paris. Probably need a week for StanHeaders and rstan binaries to be built.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

Bob Carpenter

unread,
Sep 2, 2016, 1:05:17 PM9/2/16
to stan...@googlegroups.com
No sense both of us doing it. I can do it if you don't
want to. I'm knocking out all the tiny bugs assigned
to me that are half bug and half feature request, but
no reason to hold up the release for that.

The biggy is the broken Poisson log CDFs. I hate to
release with that broken, but Michael doesn't have time
to look at it.

- Bob

> On Sep 2, 2016, at 6:58 PM, Daniel Lee <bea...@alum.mit.edu> wrote:
>
> Yup. I don't see anything else holding us up. I'll start writing the release notes. (If anyone writes it up before I finish it out, just email me. I tend to update the file with the tagging process.)
>
> On Fri, Sep 2, 2016 at 7:26 AM, Bob Carpenter <ca...@alias-i.com> wrote:
> Sounds good. Looks like you merged the ternary op fix already,
> so I think we're good to go.
>
> Thanks!
>
> - Bob
>
> > On Sep 2, 2016, at 3:23 AM, Daniel Lee <bea...@alum.mit.edu> wrote:
> >
> > Hi all,
> >
> > There are just a couple more things that we need before we can release Stan:
> >
> > Math Library:
> > - nothing outstanding.
> >
> > Stan Library:
> > - Bug fix for ternary operator: https://github.com/stan-dev/stan/pull/2046 We should be able to tag this tonight / tomorrow.
> >
> >
> > There are a few more pull requests that are out now and we can merge them if we have time.
> >
> > Unless anyone objects, I can tag the math library and stan library either tomorrow or perhaps Monday.
> >
> >
> >
> > Daniel
> >
> >
> >
> > On Sun, Aug 28, 2016 at 5:56 PM, Ben Goodrich <goodri...@gmail.com> wrote:
> > On Sunday, August 28, 2016 at 5:14:50 PM UTC-4, Daniel Lee wrote:
> > Looks like we've got a lot of bug fixes stacked up and ready to go. When do we want to release?
> >
> > Soon if you are going to use it in Paris. Probably need a week for StanHeaders and rstan binaries to be built.
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.

Daniel Lee

unread,
Sep 2, 2016, 1:09:01 PM9/2/16
to stan...@googlegroups.com

Bob Carpenter

unread,
Sep 2, 2016, 1:09:17 PM9/2/16
to stan...@googlegroups.com
Maybe we could change the broken functions to throw exceptions
that say it's a known bug? I really hate the idea of releasing
with functions that we know return the wrong values.

- Bob

Rob Trangucci

unread,
Sep 2, 2016, 1:11:43 PM9/2/16
to stan...@googlegroups.com
Do I have time to get the specialized cov_exp_quad in?


Rob

> > To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

Daniel Lee

unread,
Sep 2, 2016, 1:11:51 PM9/2/16
to stan...@googlegroups.com
Whoops, just sent an empty email.

I'm happy doing it -- I'm just going to take a break for lunch now. I'd get to it I'm a couple of hours at the earliest.

I'll take a pass at the Poisson log cdfs to see if I can spot anything this afternoon. If not, we'll release without a fix for that (since we won't know how to fix it)



Daniel

Bob Carpenter

unread,
Sep 2, 2016, 1:14:17 PM9/2/16
to stan...@googlegroups.com
If you can get a failing unit test with known values or derivatives
not being right, would you mind just adding a thrown exception that
says we know it's broken and are working on fixing it? I'd rather do
that than just fail.

- Bob

Daniel Lee

unread,
Sep 2, 2016, 1:21:18 PM9/2/16
to stan...@googlegroups.com
Will do.

Michael Betancourt

unread,
Sep 2, 2016, 1:32:45 PM9/2/16
to stan...@googlegroups.com
Rather, I spent a bunch of time loping at is and
validating everything but couldn’t find anything
close to an error anywhere.

Bob Carpenter

unread,
Sep 2, 2016, 1:58:17 PM9/2/16
to stan...@googlegroups.com
We have a clearly broken model with one program that
works with a similar program that should do the same
thing if all the truncation and lcdf/lccdf functions
worked properly. So Michael's right that we don't know
where the problem is.

- Bob

Ben Goodrich

unread,
Sep 2, 2016, 2:32:14 PM9/2/16
to stan development mailing list
On Friday, September 2, 2016 at 1:58:17 PM UTC-4, Bob Carpenter wrote:
We have a clearly broken model with one program that
works with a similar program that should do the same
thing if all the truncation and lcdf/lccdf functions
worked properly.  So Michael's right that we don't know
where the problem is.

I haven't really been following this, but if you save

functions {
  real f1_lp(int y, real rate) {
    y ~ poisson(rate) T[1,];
    return target();
  }
 
  real f2_lp(int y, real rate) {
    y ~ poisson(rate);
    target += -log1m(exp(poisson_lcdf(0 | rate)));
    return target();
  }
}
model {}

as poisson.stan, and execute

rstan::expose_stan_functions("poisson.stan")

and then do

y <- 3L
rate
<- pi

f1_lp(y, rate) # -1.301961
f2_lp
(y, rate) # -1.454987
dpois
(y, rate, log = TRUE) - ppois(1, rate, lower.tail = FALSE, log = TRUE) # -1.301961
dpois
(y, rate, log = TRUE) - ppois(0, rate, lower.tail = FALSE, log = TRUE) # -1.454987

So, it looks as if the generated code for y ~ poisson(rate) T[1,] is truncating away 0 and 1 rather than only 0.

Ben

Bob Carpenter

unread,
Sep 2, 2016, 2:34:17 PM9/2/16
to stan...@googlegroups.com
Thanks. That may be the root of the problem. I always
get confused about how CDFs are defined.

- Bob

Ben Goodrich

unread,
Sep 2, 2016, 2:45:29 PM9/2/16
to stan development mailing list
On Friday, September 2, 2016 at 2:34:17 PM UTC-4, Bob Carpenter wrote:
Thanks.  That may be the root of the problem.  I always
get confused about how CDFs are defined.

Also, in the C++

        if (y < 1) lp_accum__.add(-std::numeric_limits<double>::infinity());
       
else lp_accum__.add(-poisson_ccdf_log(1, rate));

I'm not sure if y < truncation_point should be returning negative infinity or throwing an exception or calling exit() if exit() exists these days.

Ben

Bob Carpenter

unread,
Sep 2, 2016, 2:53:17 PM9/2/16
to stan...@googlegroups.com
I can fix this all tomorrow if we can hold off on the release.
I think this is the most critical issue. I'm not even sure there's
a bug yet so much as a misunderstanding of how it's all supposed to
work, but I can go through it all tomorrow and get the user model
working and make sure everyting's doing the right thing.

It should probably be throwing an exception at this point, though
we've had multiple discussions of how the domains of CDFs and PDFs
should work. I think the conclusion was that we should throw exceptions
whenever we catch something untoward, but that we didn't agree as
to what constituted bad behavior here.

- Bob

Ben Goodrich

unread,
Sep 2, 2016, 3:05:37 PM9/2/16
to stan development mailing list
On Friday, September 2, 2016 at 2:53:17 PM UTC-4, Bob Carpenter wrote:
I can fix this all tomorrow if we can hold off on the release.
I think this is the most critical issue.  I'm not even sure there's
a bug yet so much as a misunderstanding of how it's all supposed to
work, but I can go through it all tomorrow and get the user model
working and make sure everyting's doing the right thing.

It is a big issue but only for truncated count outcomes. For,

y ~ normal(mu, sigma) T[1,];

then if y < 1, then I think it should exit but if y = 1, then it should throw an non-fatal exception. It is possible that the user wrote

parameters {
  real
<lower=1> y;
 
...
}

and y just underflows to 1.

For


y ~ poisson(rate) T[1,];

then if y <= 0, then I think it should exit. If y = 1, then it should return something finite.

Ben

Bob Carpenter

unread,
Sep 3, 2016, 11:36:17 AM9/3/16
to stan...@googlegroups.com
It should throw, because the bounds might be a parameter.
We only want to exit when we have that facility when there's
something we absolutely know is not recoverable.

I created an issue:

https://github.com/stan-dev/stan/issues/2053

- Bob
Reply all
Reply to author
Forward
0 new messages