CGPM analysis sometimes hangs on one model; workaround for recovering progress
doctorpangloss opened this issue · 0 comments
doctorpangloss commented
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:
- Interrupt the analysis using
jupyter
's terminate button orkillall -INT "python"
. - Retrieve your
generator_id
from thebayesdb_generator
table. - 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)