getting advi into pystan

49 views
Skip to first unread message

Alp Kucukelbir

unread,
Apr 12, 2016, 4:29:39 PM4/12/16
to stan development mailing list
hi everyone (but especially allen and ben),

i spent 2.5 hours today trying to understand how pystan/rstan works. i now have a new-found respect for how much work goes into this kind of work. this is crazy.

so i think i "fixed" what was stopping us from moving forward: `stanfit4model.pyx` was not setting *any* of the variational arguments, so the call to advi/stan was failing.

now that i've fixed that, i'm faced with a more formidable task that i could use some help with.

in stan_fit.hpp the `sampler_command` function never writes anything into `holder`, thus nothing gets returned to python when we call `model.vb()`.

it seems like ben wrote a whole suite of `execute_sampling` functions, that appear to populate the holder object for sampling. (i thought i'd work with what optimization has, but i'm even more confused as a function `write_comment` appears to be what is placing the MAP estimate [sorry andrew] into the holder!)

could i get either of you on skype sometime this week to walk me through this? i think having 30 minutes of you on a screenshared session will help immensely.

once i write that missing piece, the rest of the work lies within `model.py`, but it only appears to be a few lines of code. (allen already built much of the scaffolding.)

thanks!

cheers,
alp

Bob Carpenter

unread,
Apr 12, 2016, 5:05:31 PM4/12/16
to stan...@googlegroups.com

> On Apr 12, 2016, at 4:29 PM, Alp Kucukelbir <akucu...@gmail.com> wrote:
>
> hi everyone (but especially allen and ben),
>
> i spent 2.5 hours today trying to understand how pystan/rstan works. i now have a new-found respect for how much work goes into this kind of work. this is crazy.

:-) I'm optimistic it'll be better in 2 months when the
command refactor's in place.

- Bob

Alp Kucukelbir

unread,
Apr 18, 2016, 11:03:01 AM4/18/16
to stan development mailing list
friendly ping :)

Bob Carpenter

unread,
Apr 18, 2016, 11:38:31 AM4/18/16
to stan...@googlegroups.com
I'm not sure who you're pinging for what.

- Bob

> On Apr 18, 2016, at 11:03 AM, Alp Kucukelbir <akucu...@gmail.com> wrote:
>
> friendly ping :)
>
> --
> 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.

Alp Kucukelbir

unread,
Apr 18, 2016, 11:45:28 AM4/18/16
to stan development mailing list
i'm pinging ben and/or allen (and/or anyone else who understands this).

regarding this:

Ben Goodrich

unread,
Apr 18, 2016, 1:21:27 PM4/18/16
to stan development mailing list
On Monday, April 18, 2016 at 11:45:28 AM UTC-4, Alp Kucukelbir wrote:
i'm pinging ben and/or allen (and/or anyone else who understands this).

regarding this:


It was mostly Jiqiang who wrote the R code, but I could try to walk you through it Thursday or Friday if you are in New York or by Hangout otherwise.

Ben

Jiqiang Guo

unread,
Apr 18, 2016, 2:50:48 PM4/18/16
to stan...@googlegroups.com
I thought it was Python related.  But if I can help, let me know.  I don't think I can meet you in person this week.  So maybe I can join the hangout if needed.

Jiqiang 
Reply all
Reply to author
Forward
0 new messages