rlouf / mcx

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

Return a trace when inference is interrupted with Ctrl-C #76

Closed rlouf closed 3 years ago

rlouf commented 3 years ago

While we would like to interrupt inference when there are too many divergences, we would also like to be able to inspect the trace to understand where they come from. Currently the program throws a KeyboardInterrupt exception and no trace is returned.

Note: Only implement this behavior for the interactive mode and make it clear that this mode should not be used for production.