Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

advi should output samples at last iteration after being interrupted (ctrl-c) #1663

Open
akucukelbir opened this issue Nov 3, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@akucukelbir
Copy link
Contributor

john reid asks

Also would it be possible to have cmdstan output samples from the best iteration so far if it is interrupted (Ctrl-C)?

@syclik
Copy link
Member

syclik commented Nov 3, 2015

Yes, it is possible.

There is an interrupt callback that is supposed to be called at every iteration. For CmdStan, this is currently a noop, but that could change.

But, the advi code needs to be cleaned up and brought up to the rest of Stan's standards in order for this to work.

Once the issue Dustin created is fixed, this should be a lot easier to do.

On Nov 3, 2015, at 6:54 AM, Alp Kucukelbir notifications@github.com wrote:

john reid asks

Also would it be possible to have cmdstan output samples from the best iteration so far if it is interrupted (Ctrl-C)?


Reply to this email directly or view it on GitHub.

@akucukelbir
Copy link
Contributor Author

roger that. this would be super useful.

@syclik syclik added this to the Future milestone Nov 3, 2015
@syclik syclik added the feature label Nov 3, 2015
@bob-carpenter
Copy link
Contributor

You mean not stop when you interrupt it, but continue to work? That
seems counter to the way interrupts are supposed to work. If it's just
a super-fast cleanup or dump that's OK, but if you output samples and there
are lots of parameters, that can be a lot of work.

  • Bob

On Nov 3, 2015, at 6:54 AM, Alp Kucukelbir notifications@github.com wrote:

john reid asks

Also would it be possible to have cmdstan output samples from the best iteration so far if it is interrupted (Ctrl-C)?


Reply to this email directly or view it on GitHub.

@akucukelbir
Copy link
Contributor Author

just a super-fast dump of the mean parameters of q (the variational
approximation).

typically, these parameters are more than enough to diagnose "what's going
wrong"; which is a whole lot better than what ctrl-c does right now (no
output).

On Tue, Nov 3, 2015 at 2:31 PM, Bob Carpenter notifications@github.com
wrote:

You mean not stop when you interrupt it, but continue to work? That
seems counter to the way interrupts are supposed to work. If it's just
a super-fast cleanup or dump that's OK, but if you output samples and there
are lots of parameters, that can be a lot of work.

  • Bob

On Nov 3, 2015, at 6:54 AM, Alp Kucukelbir notifications@github.com
wrote:

john reid asks

Also would it be possible to have cmdstan output samples from the best
iteration so far if it is interrupted (Ctrl-C)?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#1663 (comment).

@bob-carpenter
Copy link
Contributor

OK --- I was just taking "sample" literally. A parameter
dump should be fine even for lots of params.

  • Bob

On Nov 3, 2015, at 4:04 PM, Alp Kucukelbir notifications@github.com wrote:

just a super-fast dump of the mean parameters of q (the variational
approximation).

typically, these parameters are more than enough to diagnose "what's going
wrong"; which is a whole lot better than what ctrl-c does right now (no
output).

On Tue, Nov 3, 2015 at 2:31 PM, Bob Carpenter notifications@github.com
wrote:

You mean not stop when you interrupt it, but continue to work? That
seems counter to the way interrupts are supposed to work. If it's just
a super-fast cleanup or dump that's OK, but if you output samples and there
are lots of parameters, that can be a lot of work.

  • Bob

On Nov 3, 2015, at 6:54 AM, Alp Kucukelbir notifications@github.com
wrote:

john reid asks

Also would it be possible to have cmdstan output samples from the best
iteration so far if it is interrupted (Ctrl-C)?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#1663 (comment).


Reply to this email directly or view it on GitHub.

@syclik
Copy link
Member

syclik commented Dec 1, 2016

@dustinvtran, if you're going to work on this, branch from feature/issue-1751-service-methods until it gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants