[IPython-user] Pushing proxy objects

Matthew Turk matthewturk@gmail....
Sat Jun 6 12:16:43 CDT 2009


Hi there,

I'm trying to set up remote visualization of data via the
MultiEngineClient interface, using matplotlib.  What I'd really like
to be able to do is to push across the network a proxy object for a
local set of axes and figure and then allow the remote engine to
interact with a local object.

For instance, something like the following in the controller session,
to put proxies for local figs and axes on the remote clients:

local_fig = pylab.gcf()
local_ax = pylab.gca()

mec = MultiEngineClient()
mec.push_proxy("fig", local_fig, [0])
mec.push_proxy("ax", local_fig, [0])
mec.execute("some_plotting_command(fig, ax)", [0])

This would enable something like local visualization via the wxAgg
backend, while the remote compute node wouldn't necessarily have to
handle any of the GUI interaction.  I believe that all of the standard
arguments for the OO API in matplotlib are pickleable, so passing
*those* across the network should work.  The return values would be
trickier, but I suppose some subset of objects for common plotting
commands could be identified that would auto-proxy rather than
attempting to pickle, say, subplot axes.

Is something like this already possible with the IPython parallel
engine?  If not, any suggestions on where to start out?

Thanks very much!  As a side note, the IPython ipengine interface has
been great and very easy to set up and use for parallel analysis of
data.

-Matt


More information about the IPython-user mailing list