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
922 stars 64 forks source link

CGPM analysis sometimes hangs on one model; workaround for recovering progress #576

Closed doctorpangloss closed 7 years ago

doctorpangloss commented 7 years ago

Occasionally analysis won't start for one of the initialized models. This means a checkpoint is never issued. As a workaround, I interrupt the multiprocessing execution and serialize the engine myself:

  1. Interrupt the analysis using jupyter's terminate button or killall -INT "python".
  2. Retrieve your generator_idfrom the bayesdb_generator table.
  3. Serialize the engine, while the collected data is still in memory:
generator_id = 1
cgpm = generator.bdb.metamodels['cgpm']
engine = cgpm._engine(generator.bdb, generator_id)
cgpm._serialize_engine(generator.bdb, generator_id, engine, True)