probcomp / cgpm

Library of composable generative population models which serve as the modeling and inference backend of BayesDB.
Apache License 2.0
25 stars 11 forks source link

Migrate multiprocessing in Engine to use parallel_map from Venturecxx #159

Closed fsaad closed 8 years ago

fsaad commented 8 years ago

Using multiprocessing.Pool cannot share objects between parent and child process, which requires expensive serialize/deserialize operations. The downside of parallel_map is that the pool does not stay open, but that is OK since we were closing multiprocessing.Pool once per method invocation anyway.