As of IPython 1.0, you can instruct %%px to also execute the cell locally. This is done using the "--local" flag.
%%px --local
Pergunta
In IPython for parallel execution we have multiple engines.
The jobs are dispatched to them using: %%px
cell magics to set up the environment in the clients and then using DirectView map_sync
to run the various experiments.
The experiments return a named-tuple of results. Thus this named-tuple need to be declared in both the client and in each engine.
Currently each time I run it, I run it twice, one with %%px
and once without.
is there a flag of %%px
that will make it run both locally and in each engine?
Solução
As of IPython 1.0, you can instruct %%px to also execute the cell locally. This is done using the "--local" flag.
%%px --local