Package: distob
Distributed computing made easier, using remote objectsN.B. this is a development pre-release: still a lot left to be doneOverviewDistob will take your existing python objects, or a sequence of objects,
and scatter them onto many IPython parallel engines, which may be
running on a single computer or on a cluster.In place of the original objects, proxy objects are kept on the client
computer that provide the same interface as the original objects. You
can continue to use these as if the objects were still local. All
methods are passed through to the remote objects, where computation is done.In particular, sending numpy arrays to the cluster is supported.A numpy array can also be scattered across the cluster, along a particular axis. Operations on the array can then be automatically done in parallel (either using ufuncs, or by usingvectorize()below)Note: numpy with__numpy_ufunc__feature enabled (not yet released) is required to support distributed array arithmetic and distributed ufuncs. You can get numpy with this experimental feature enabled here:https://github.com/mattja/numpy/archive/master.zipDistob is an object layer built on top ofipyparallel, so it will
make use of your default IPython parallel profile. This allows different
cluster architectures, local CPUs, SSH nodes, PBS, Amazon EC2, etc.functionsscatter(obj)Distribute any object (or list of objects) to remote iPython engines, return a proxy.gather(obj)Fetch back a distributed object (or list), making it local again.vectorize(f)Turn an ordinary function (that takes a single object or array) into one that acts in parallel on a scattered list or array.apply(f, obj)is the same asvectorize(f)(obj)distributed numpy arraysscatter(a, axis=2)Distribute a single numpy array along axis 2, returning a DistArray.Arithmetic operations can freely mix ordinary arrays with the new array types.Normal numpy ufuncs can also be used on the distributed arrays.Arithmetic and ufunc computations will automatically be routed to an engine, or executed in parallel on several engines, depending on where the data is. (requires numpy with the__numpy_ufunc__feature enabled)concatenate,vstack,hstack,dstack,expand_dims,transpose,rollaxis,split,vsplit,hsplit,dsplit,broadcast_arrays:These work like the numpy functions of the same name. But these can be used with a mix of ordinary ndarrays, RemoteArrays and DistArrays, performing array structural changes while keeping the actual data distributed across multiple engines.For example, stacking several RemoteArrays gives a DistArray, without needing to move data.The distributed arrays so far support basic indexing, slices and advanced integer indexing.classesRemoteArrayproxy object representing a remote numpy ndarrayDistArraya single ndarray distributed across multiple enginesRemotebase class, used when auto-creatingRemote*proxy classes@proxy_methods(base)class decorator for auto-creatingRemote*proxy classesObjectHubdict interface giving refs to all distributed objects cluster-wideObjectEnginedict holding the distributed objects of a single IPython engineRefreference to a (possibly remote) objectattributesengine: theObjectEngineinstance on each host (ObjectHubon
the client)TODOAllow assignment to slices of remote arrays.Properly implement caching of remote method results.Auto-creation of proxy classes at runtime (depends uqfoundation/dill#58)For ufunc execution, still need to implementreduce,accumulate,reduceat,outer,atmethods.Make proxy classes more robust, adaptingwrapt(pypi.python.org/pypi/wrapt)ThanksIncorporatespylru.pyby Jay Hutchinson,http://github.com/jlhutch/pylruipyparallelinteractive parallel computing:https://ipyparallel.readthedocs.org/dillby Mike McKerns for object serialization, see:http://trac.mystic.cacr.caltech.edu/project/pathos