You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One gotcha to watch out for -- I've found that using multiprocessing correctly usually requires OS-specific tweaks. Make sure any multiprocessing examples work on, at minimum, Windows 10 and some reasonable OSX.
if not multiprocessing.get_start_method() == "spawn":
multiprocessing.set_start_method('spawn')
or the new processes hang. The guard is there because if you try to set_start_method when the start method is already safe, multiprocessing throws an exception. This is a known bug in Linux, too.
Another problem, this one specific to IPython notebooks: IPython can't pass functions defined in a notebook to a function like Pool.map, for reasons I really don't understand. If you want to wrap your lineage simulation in anything more complex than the built-in bioscrape simulation methods, you have to write that function in a separate file and import it. I've used the following code to write a notebook-defined function simulate_single_lineage into a temporary file and import it.
To do a parameter sweet and to run many stochastic simulations and average the results to get a distribution.
The text was updated successfully, but these errors were encountered: