probcomp / bayeslite

BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself.
http://probcomp.csail.mit.edu/software/bayesdb
Apache License 2.0
918 stars 64 forks source link

Loom Backend: Fix the caching mechanism of server objects #606

Closed fsaad closed 6 years ago

fsaad commented 6 years ago

The only place that the server object is cached occurs after the call to analyze. https://github.com/probcomp/bayeslite/blob/c49fb01cbd918f565aeb0a00669434c6bf16dbeb/src/backends/loom_backend.py#L412-L414

In simulate_joint, there is an invocation, which means None will be returned by this statement if no analyze query was invoked prior in the current session: https://github.com/probcomp/bayeslite/blob/c49fb01cbd918f565aeb0a00669434c6bf16dbeb/src/backends/loom_backend.py#L699

The whole caching mechanism needs to be rewritten to have intermediate class methods that appropriately probe and population the cache.