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

Progress bar #435

Open
rzu512 opened this issue May 30, 2019 · 3 comments
Open

Progress bar #435

rzu512 opened this issue May 30, 2019 · 3 comments

Comments

@rzu512
Copy link

rzu512 commented May 30, 2019

Is it possible to add a progress bar to mcmc training?

@csuter
Copy link
Member

csuter commented May 30, 2019

I think this'll be tricky in general. You could imagine some kind of hack to increment a tqdm inside of trace_fn, but this probably won't work if you wrap sampling in tf.function (which you almost certainly should, if you're doing anything sufficiently non-trivial, which you probably are because you want a progress bar in the first place :)).

I strongly doubt we will add this functionality in tfp.mcmc directly; it would be hard for the same reasons described above, and feels pretty far "out of scope" for a library of fundamental mcmc building blocks.

That said, @SiegeLordEx has some nascent design ideas on sampling drivers (with some sort of compositionality, I expect?), and it's conceivable that something like this could fit in to that picture, somehow.

@SiegeLordEx
Copy link
Member

SiegeLordEx commented May 30, 2019

Yeah, I concur with @csuter. In general, MCMC will be running inside a @tf.function or even an XLA function, e.g. the entire computation will often be on a GPU. I think in this case, it'd be appropriate to do short runs of the chain, updating the progress bar after each one. tfp.mcmc API supports resuming the MCMC chains, so that should be possible.

See the discussion in this #356 for some code examples. There the question is largely the same, except that there you're dumping summaries to TensorBoard.

@brianwa84
Copy link
Contributor

brianwa84 commented May 31, 2019 via email

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

No branches or pull requests

5 participants