Discrepancy in performance of "Infer" operator

24 views
Skip to first unread message

Isaac Davis

unread,
Apr 14, 2020, 2:27:19 PM4/14/20
to webppl-dev
I've noticed a discrepancy in how the "Infer" operator performs when I run it locally versus in-browser, and I'm wondering if anyone can help me understand the source. 

I have a short program that uses Infer with the default options (i.e. Infer({model: model}) ). When I run this program locally, it takes about 2 seconds and appears to return the correct distribution. When I run the exact same program in-browser (specifically, the webppl demo page http://webppl.org/), I get the usual sequence of warning messages indicating a time out:
"
Enumerate timeout: max time was set to 5000..quit enumerate
Using "rejection"
0.23 samples/sec is below threshold...quit rejection
Using "SMC" (interleaving samples and factors detected)
...
"

Curiously, I can get the program to run in-browser if I specify the 'MCMC' method (i.e. replace the previous command with Infer({model: model, method: 'MCMC'})), but it still takes much longer to run than it does locally. 

I am concerned that this is due to some property of the Infer operator that I'm unaware of. Does anyone have any suggestions as to the source of this discrepancy?

Cheers
-Isaac

null-a

unread,
Apr 14, 2020, 3:02:44 PM4/14/20
to webppl-dev
> Does anyone have any suggestions as to the source of this discrepancy?

Perhaps local and web are running different versions of WebPPL? webppl.org appears to be running "v0.9.15-430b433d". Perhaps you can check your local version with `webppl --version`.

If you don't get to the bottom of it, I'd be interested in seeing your definition of `model` so I can try and replicate the problem.

Isaac Davis

unread,
Apr 19, 2020, 1:20:59 PM4/19/20
to webppl-dev
Thanks for the suggestions. After some tinkering I discovered that there was in fact a discrepancy in the code. Now that that is resolved, the program converges both locally and online.

Thanks!
Reply all
Reply to author
Forward
0 new messages