How can I use dill instead of pickle with load_balanced_view

回眸只為那壹抹淺笑 提交于 2019-12-08 08:10:37

问题


I know I can make IPython parallel use dill instead of pickle with a direct view using

c = Client()
dv = c[:]
dv.use_dill()

But how can I enable it with dv.load_balanced_view()?


回答1:


I think you can call use_dill on a direct view and then use a load-balanced view:

c = Client()
c.direct_view().use_dill()
v = c.load_balanced_view()
...

From the DirectView.use_dill documentation:

This calls IPython.utils.pickleutil.use_dill() here and on each engine.



来源:https://stackoverflow.com/questions/24042443/how-can-i-use-dill-instead-of-pickle-with-load-balanced-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!