Package mdp :: Package parallel :: Class FlowExecuteCallable
[hide private]
[frames] | no frames]

Class FlowExecuteCallable


Implements data execution through the whole flow.

Note that one could also pass the flow itself as the callable, so this 
class is not really needed. However, it serves as the base class for more
complicated callables, e.g. which do some kind of preprocessing before
executing the data with the flow.

Instance Methods [hide private]
 
__call__(self, x)
Return the execution result.
 
__init__(self, flow, nodenr=None)
Store everything for the execution.
 
fork(self)
Return a fork of this callable, e.g.

Inherited from FlowTaskCallable: setup_environment

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, x)
(Call operator)

 
Return the execution result.

x -- data chunk

Overrides: TaskCallable.__call__

__init__(self, flow, nodenr=None)
(Constructor)

 
Store everything for the execution.

keyword arguments:
flow -- flow instance for the execution
nodenr -- optional nodenr argument for the flow execute method
extensions -- List of the names of the extensions required by the
    callable. These are then activated by setup_environment.

Overrides: object.__init__

fork(self)

 
Return a fork of this callable, e.g. by making a copy.

This method is always used before a callable is actually called, so
instead of the original callable the fork is called. The ensures that
the original callable is preserved when cachin is used. If the callable
is not modified by the call it can simply return itself.  

Overrides: TaskCallable.fork
(inherited documentation)