rlouf / mcx

Express & compile probabilistic programs for performant inference on CPU & GPU. Powered by JAX.
https://rlouf.github.io/mcx
Apache License 2.0
324 stars 17 forks source link

Sampling UX #11

Open rlouf opened 4 years ago

rlouf commented 4 years ago

Opening this to have a discussion with myself about sampling UX.

rlouf commented 4 years ago

Let the user know what is happening

A user should get at least some feedback, at best interesting information, when performing an action.

Inference data

There are several things we need to consider when thinking about how to represent inference data in mcx:

This begs the question of the diagnostics when we append new samples to the trace. If we decide to keep track of them in the trace, besides divergences we have to think about how to handle them: do we manage their value at the execution level, or the in the trace?

I tend to lean towards the execution: why should the trace be anything else than a data store and manage calculations as well? The generate executor can easily keep track of the state of the algorithms used to compute diagnostics; for sample we would have to add these states to the class’ state.

rlouf commented 4 years ago

A thought for people using mcx in a production environment: the sampler should provide clear and actionable logs.