def compute_pipeline(pipes, input, **kwargs): """computes a pipeline in a distributed fashion""" exc = Executor(EXECUTOR_HOST) for op, pipe in pipes: f = prep_func(pipe, **kwargs) input = globals()[op](exc, f, input) return _get_results(exc, input)
def decorated(self, pipe, input, **kwargs): func = prep_func(pipe, **kwargs) return f(self, func, input)