One cell in my notebook executes for a long time, while the other CPU's in the machine are idle. Is it possible to run other cells in parallel?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Not magically, and probably not what you think but yes. Here is the documentation for ipyparallel
(formerly IPython parallel
) that will show you how to spawn multiple IPython kernel. After you are free to distribute the work across cores, and you can prefix cells with %%px0
%%px1
... %%px999
(once set up) to execute a cell on a specific engine, which in practice correspond to parallel execution of cell. I woudl suggest having a look as Dask as well.