python - Reload module on remote ipengine when using ipython -
hoping has straightforward answer missed reading of docs. following problem -
- i have module loaded on ipengine(s) on startup
- i've since made changes module
- i want these changes propagated remote ipengine(s) i.e. want module reloaded in remote instances
how can accomplished?
you can turn on ipython autoreload feature on engines following:
%px %load_ext autoreload %px %autoreload 2 note solution, , calling reload dview.execute() both have problem when new engines can come online later (as when using batch scheduler on cluster): execute on engines present.
one other wrinkle: may want deep (recursive) reloading. see option ipengine:
--zmqinteractiveshell.deep_reload=<cbool> default: false enable deep (recursive) reloading default. ipython can use deep_reload module reloads changes in modules recursively (it replaces reload() function, don't need change use it). deep_reload() forces full reload of modules code may have changed, default reload() function not. when deep_reload off, ipython use normal reload(), deep_reload still available dreload().
Comments
Post a Comment