[IPython-User] Pushing Code to Engines?
Tue Aug 16 09:21:32 CDT 2011
Thanks for the tip.
Does this approach work for load balanced view? that's what I've been
and couldn't get it to work exactly, but I will try again when I get home.
On Mon, 15 Aug 2011 13:51:29 -0700, MinRK <email@example.com> wrote:
> To call a function on args remotely, you just use apply:
> rc = Client()
> dview = Client[:]
> def f(a):
> return a*2
> # call f(5) on every engine:
> dview.apply(f, 5)
> # send f to all engines (as 'g', you can give it any name), so you can
> it many times:
> dview['g'] = f
> # now you can call it with execute:
> On Mon, Aug 15, 2011 at 13:34, Darren Govoni <firstname.lastname@example.org>
>> I have a cluster and create a Client() from ip shell.
>> I define a function in my shell space. Is it possible to have it pushed
>> to the engines to execute? Or does all the code have to reside
>> on the engines already?
>> thanks for any tips. I'm reading all the docs, but missing these
>> IPython-User mailing list
More information about the IPython-User