probmods / webppl-editor

Browser-based editor for WebPPL
Other
8 stars 1 forks source link

Inference progress interface #8

Open null-a opened 8 years ago

null-a commented 8 years ago

I've added callbacks to webppl's MCMC method will allow us to experiment with an inference progress interface at some point.

As a proof of concept, I made an example of using these callbacks to drive a progress bar in node.

The interface for this is very similar to the one we discussed earlier.

longouyang commented 8 years ago

Proof of concept working in 0593391

Demo at http://web.stanford.edu/~louyang/wp-editor/compiled/index.html , run the MCMC callback example [1]

There's some under the hood improvements to make (maybe use React or somehow throttle DOM updates), so I'll keep the issue open.

Also, should the default behavior in the browser be to have a progress bar? This seems desirable but might be a little tricky to implement.

[1] reproducing the code here in case i change that demo site:

var model = function() { return gaussian(0,1) };
MCMC(model, { samples: 1e5, callbacks: [wpEditor.MCMCProgress()]});